Sending a .gz file in POST

I need to send a tar.gz file to the api end point, I used form data to locate the file but Katlon shows below,
{
“status”:“FAILURE”,
“message”:“Bad Request”
}

Below is the HAR
{
“log” : {
“version” : “1.2”,
“pages” : [ ],
“entries” : [ {
“startedDateTime” : “2021-02-03T16:26:28.882Z”,
“request” : {
“method” : “POST”,
“url” : “https://cmc-app-us/actions/upload/translate”,
“httpVersion” : “”,
“cookies” : [ ],
“headers” : [ {
“name” : “Authorization”,
“value” : “Basic YXBpdXNlcjohcGhhcjQzMjE=”
}, {
“name” : “Content-Type”,
“value” : “multipart/form-data”
}, {
“name” : “Accept”,
“value” : “/
}, {
“name” : “Accept-Encoding”,
“value” : “gzip, deflate, br”
}, {
“name” : “Connection”,
“value” : “keep-alive”
}, {
“name” : “Content-Type”,
“value” : “text/plain”
}, {
“name” : “Cookie”,
“value” : “AWSALB=qOIB59hLY4YhHvXKIUsQ1TrPiUr6KLU+yXe1l1EHrKQ/UHb/gU/UFerBXLQG7YcrM/Ki5QM3PFtWGTl4c3WA7Sk6ud7tV+sf/N8fO6lapGv4D8G/7OAiOvNfXymW; AWSALBCORS=qOIB59hLY4YhHvXKIUsQ1TrPiUr6KLU+yXe1l1EHrKQ/UHb/gU/UFerBXLQG7YcrM/Ki5QM3PFtWGTl4c3WA7Sk6ud7tV+sf/N8fO6lapGv4D8G/7OAiOvNfXymW; SERVER-TIME=1612366939980; SESSION-EXPIRES=1612374139980; SESSIONID=RRRZ-7SV6fb89ztepzUKSzifZPnBkgbHpum_3yif; XSRF-TOKEN=7ee81c19-d0b8-4318-8c61-e0ec965a8b9e”
}, {
“name” : “Content-Type”,
“value” : “application/json”
} ],
“queryString” : [ ],
“postData” : {
“mimeType” : “multipart/form-data”,
“text” : "–XLcfrNVldlSgr0FY4qGXVUb4ZXgygnaU7QkEb\r\nContent-Disposition: form-data; name=“xv203.1.100_Upgrade”; filename=“xv203.1.100_Upgrade.tar.gz”\r\nContent-Type: application/gzip\r\nContent-Transfer-Encoding: binary\r\n\r\n\u001F�\b\u0000nz\u0019`\u0000\u0003�Yp\u001BG�6(�g�Ν���2\u0013�����\u001B!Q\u0014��}{z\u001A\u0004 �67\u0013�d��S\u0004�@\u0011���\u0000�tt��Œlٲ��"[�%[�-w��-��"\u001A���%b"�4\u0013�)�mu��<�Ü�Y\u0005\u0014\nY\u000B6\u0012r\u0013�2��̪s�<����d�\u000F����X߾�}]G���lR\u0013\u0012��~:::6o�H���M���s\u0003��φ�\u001Dd݆��M��7vl\G:�m�k�HG���~r�!h �.dtQ�\u000B�0�&3��֬�T�\u000E���z<��B��O���_��U�Z��W���\u0018y��\u001F��꿇��V=���7��̳�\u001E\u0019\u001A\u001A\u001Ad�h�+�o�#ɯ���V����j�]�fe�=#�ev����[��.�ە��Q\fI\u0011W��Us�Nv��G��������_�����X���vt<���7u�{n��!�{8��\u0019��7GC\u001BC�m�\�.�չf�ƍ\u001B�t��\�&�ܦ-�M]�u�[\u001F��-�&Z��\n.G���h��{s���?\u001A�\u0015�^ˋ�\u001943�t�d�(\u0015�\u000F7t��\u0004\u001E\u0004\u0002AH��\u001B�"�\tEշQq��5��\u0003��)9�;��Y�;��+u;\u0019�l6���L�\u0018��l2�;��$ҹ\u0007����;�P�B\u0006X\u000FOf]��S\u000F�+h�_̖PP�\u001Cn㉸�TG� P\u0006�l0\u001FU�s��H�]\u0011~w\u001A�’“�>�\u0013:sd+\u0015Ι���4���FNr�HN\t�ٜ���+�Z�ՄO�ŗ�\f���?s~t�(���\u001DSKV�h�K\u001E-�\u0016McC\u0011\u000F%.YKw��q�gp����*щ���_�]wɬ�.��\u0017��i�\u001D�\u00190@�v2\u0003\u0014mN\u0012\u0003D��ߜ�����Uy\u001E\u001E\u000Eܿd�\u0011+[�|��B���9�\b\r\u0007�����\��\u0019�gp^\u0002�\u0011��G��m��X%�3]��\u00053G\u0015d���b\u0002�\u0013\u0013�\u0012!���9�>��x�’��8ڇ�\u001B��+�Kv\u00117\u0005/�o\u0016���Y\u000B\u0005Hn\u0017���,�әՒ��\u~�{U����\n�?.w�\�fW����I~���ɴ\u0007;P��\r��k�{k�\u0001�|��y�Յ���௢�’�\u001E�v\u001F��\u0017"�Pi��5����|������_�Z7�&ݤ���I�\u000F?Y��\u0000�!\u0000\r\n–XLcfrNVldlSgr0FY4qGXVUb4ZXgygnaU7QkEb–\r\n”,
“comment” : “”
},
“headersSize” : 0,
“bodySize” : 0,
“comment” : “”
},
“response” : {
“status” : 400,
“statusText” : “”,
“httpVersion” : “”,
“cookies” : [ ],
“headers” : [ {
“name” : “Transfer-Encoding”,
“value” : “chunked”
}, {
“name” : “X-Frame-Options”,
“value” : “DENY”
}, {
“name” : “Cache-Control”,
“value” : “no-cache, no-store, max-age=0, must-revalidate”
}, {
“name” : “X-Content-Type-Options”,
“value” : “nosniff”
}, {
“name” : “Connection”,
“value” : “keep-alive”
}, {
“name” : “Set-Cookie”,
“value” : “AWSALB=XtngqMDw7ylykabPMiBIrLhT+2p1g6vU71mSwqaM+r/8kBLZLdS9oIFQs2vuTluT5vhWTkyLS0HtRU0R2oRLm+ks2xZnjWZZHGDLWNvjKTdooTI36h+DiSeKW382; Expires=Wed, 10 Feb 2021 16:26:29 GMT; Path=/”
}, {
“name” : “Set-Cookie”,
“value” : “AWSALBCORS=XtngqMDw7ylykabPMiBIrLhT+2p1g6vU71mSwqaM+r/8kBLZLdS9oIFQs2vuTluT5vhWTkyLS0HtRU0R2oRLm+ks2xZnjWZZHGDLWNvjKTdooTI36h+DiSeKW382; Expires=Wed, 10 Feb 2021 16:26:29 GMT; Path=/; SameSite=None; Secure”
}, {
“name” : “Set-Cookie”,
“value” : “SERVER-TIME=1612369589941; path=/”
}, {
“name” : “Set-Cookie”,
“value” : “SESSION-EXPIRES=1612376789941; path=/”
}, {
“name” : “Expires”,
“value” : “0”
}, {
“name” : “Pragma”,
“value” : “no-cache”
}, {
“name” : “#status#”,
“value” : “HTTP/1.1 400 Bad Request”
}, {
“name” : “X-XSS-Protection”,
“value” : “1; mode=block”
}, {
“name” : “Date”,
“value” : “Wed, 03 Feb 2021 16:26:29 GMT”
}, {
“name” : “Content-Type”,
“value” : “application/json;charset=UTF-8”
} ],
“content” : {
“size” : 44,
“mimeType” : “application/json;charset=UTF-8”,
“text” : “{“status”:“FAILURE”,“message”:“Bad Request”}”,
“comment” : “”
},
“redirectURL” : “”,
“headersSize” : 770,
“bodySize” : -1,
“comment” : “”
},
“cache” : { },
“timings” : {
“comment” : “”,
“send” : 0,
“dns” : -1,
“wait” : 0,
“ssl” : -1,
“blocked” : -1,
“connect” : 1096,
“receive” : 0
},
“comment” : “”,
“_katalonRequestInformation” : {
“name” : “6”,
“testObjectId” : “/Users/samselvaraj-mbpr-16/Desktop/CMC/CMC_sanity/CMCSanitySuite/Object Repository/AutoTranslation.rs”,
“harId” : “801dc6f5-0052-4138-ab9a-feba704bd62c”,
“reportFolder” : null
},
“time” : 1096
} ],
“comment” : “”
}
}

Appreciate your help here,I hope Katalon supports sending tar.gz file in a POST request.The same POST works fine in Postman.

Hi @saminkit Thanks for sharing
if it works with PM it will def work on Katalon too

you are using two content-types for HTTP header. Possibly compare both headers from Postman and using in Katalon

Attached is the one from Postman.

Pls let me know which i should correct

seems like its second request ?
have this and yes Authorization is needed
image

can you retry again with new Authorization value and work around with content type as application/gzip

Updated Authorization - Did update to HTTP Header
Changed Content type to application/gzip

{
“status”:“FAILURE”,
“message”:“Bad Request”
}

seems okay! whats in Body did you check … im sure something is missing either in body (most prob) or in headers.


Pls help me what i am missing here,

CC: @Russ_Thomas @duyluong

Appreciate your help!

Does Katalon accept .gzip files in post request?.I am using a package in the post request.
Kindly help.

Can someone guide me please

@Russ_Thomas @duyluong Help me to go through this