How to Send Multipart/Form-Data Request Using Postman [Closed]

How to Send Multipart/Form-Data Request Using Postman [Closed]

I am currently using the Chrome Addon Postman - REST Client to easily create POST / GET request.

Now I want to debug an upload script and I am looking for a way to make requests encoded as "multipart/form-data" so that I can send also a file.

1

2 Answers

UPDATE: I have created a video on sending multipart/form-data requests to explain this better.


Actually, Postman can do this.

Full example:

You DON'T need to add any headers, Postman will do this for you automatically.

Make sure you check the comment from @maxkoryukov

Be careful with explicit Content-Type header. Better - do not set it's value, the Postman is smart enough to fill this header for you. BUT, if you want to set the Content-Type: multipart/form-data - do not forget about boundary field.

21

The usual error is one tries to put Content-Type: {multipart/form-data} into the header of the post request. That will fail, it is best to let Postman do it for you. For example:

Suggestion To Load Via Postman

Fails If In Header

Works

11
David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.