Tool for sending multipart/form-data request [closed]

会有一股神秘感。 提交于 2019-11-26 01:23:10

问题


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 tool to make requests encoded as \"multipart/form-data\" so that I can send also a file.


回答1:


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


Actually, Postman can do this. Here is a screenshot

Newer version : Screenshot captured from postman chrome extension

Another version

Older version

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.




回答2:


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



来源:https://stackoverflow.com/questions/16015548/tool-for-sending-multipart-form-data-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!