Submitting multipart / form-data content using the Postman Chrome extension

I am struggling with creating a multi-page / mixed POST request with the Postman Chrome extension. I keep getting HTTP 500 .

This question has already passed, but, unfortunately, the solution does not work for me.

Here is my curl request that works for me.

curl -H "Content-Type: multipart / form-data" -F "merchantLogo=@offerlogo-320-320.png; type = image / png" -F "merchantDetails=@merchant.json; type = application / json" -X PATCH localhost: 5000 / api / merchants / 57035bda0c74362faf5937f2 / details -i -v

And when I use Postman enter image description here

I get this answer

{"code": 500, "message": "There was an error processing your request. It has been logged (ID 034bec7815baca2e)."} 

Request message headers from the postman. Request Postman Headers

Somehow, merchantDetails is always passed as null when called from POSTMAN and correctly passed when called curl.

Any help would be greatly appreciated.

EDITED 1:

My POSTMAN request is copied as curl,

curl ' http: // localhost: 5000 / api / merchants / 5714d8e060b2a79e62227d1a / details ' -X PATCH -H' Pragma: no-cache '-H' Origin: chrome-extension: // fdmmgilgnpjigdojojpjoooidkmcomcm '-H' Accept-Encoding: gzip, deflate, sdch '-H' Accept-Language: en-GB, en-US; q = 0.8, en; q = 0.6 '-H' User-Agent: Mozilla / 5.0 (X11; Linux x86_64) AppleWebKit / 537.36 (KHTML, like Gecko) Chrome / 49.0.2623.87 Safari / 537.36 '-H' Content-Type: multipart / form-data; border = ---- WebKitFormBoundaryxRZ6VKzFV40ZFIsd '-H' Accept: / '- H' Cache-Control: no-cache '-H' Cookie: JSESSIONID = 1ofut8bbydk491k2s80i4rowed; JSESSIONID = yg4l9zpjs5oj1xaqnuo44ehp6 '-H' Connection: keep-alive '--data-binary $' ------ WebKitFormBoundaryxRZ6VKzFV40ZFIsd \ r \ nContent-Disposition: form data; name = "merchantDetails"; file name = "merchant.json" \ r \ nContent-Type: Application / octet stream \ r \ n \ r \ n \ r \ n ------ WebKitFormBoundaryxRZ6VKzFV40ZFIsd \ g \ nContent-Disposition: form data; name = "merchantLogo"; file name = "offerlogo-320-320.png" \ r \ nContent-Type: Image / PNG \ r \ n \ r \ n \ r \ n ------ WebKitFormBoundaryxRZ6VKzFV40ZFIsd - \ r \ n "--compressed

+7
google-chrome curl postman
Apr 11 '16 at 5:50
source share

No one has answered this question yet.

See similar questions:

47
Submitting multi-page / mixed content using the Postman Chrome extension
0
Recreate mail request in postman

or similar:

1257
application / x-www-form-urlencoded or multipart / form-data?
1161
What does enctype = 'multipart / form-data' mean?
206
Can I send an array with the Postman Chrome extension?
47
Submitting multi-page / mixed content using the Postman Chrome extension
3
How to use Chrome "Copy as cURL" for requests for sending multi-page / formal data in Windows
2
Accept mail file using mail manager
one
Postman Throws 400 Bad Request for Uploading Images with Multiple Files / Data Forms Using Jersey 2.0
one
send file using curl - multipart / form-data
0
Reverse form data responses are not the same as postman
0
How to get this multipart / form-data request working with cURL in PHP?



All Articles