发送多部分/表单数据请求的工具 [英] Tool for sending multipart/form-data request
问题描述
我目前正在使用Chrome插件邮递员-REST客户端轻松创建POST/GET请求.
I am currently using the Chrome Addon Postman - REST Client to easily create POST / GET request.
现在,我想调试一个上传脚本,我正在寻找一种工具来进行编码为"multipart/form-data"的请求,以便我也可以发送文件.
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.
推荐答案
更新:我创建了有关发送多部分/表单数据请求的视频,以更好地解释这一点.
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
较新版本:从邮递员chrome扩展程序中捕获的屏幕截图
Newer version : Screenshot captured from postman chrome extension
另一个版本
旧版本
确保您检查了@maxkoryukov的评论
Make sure you check the comment from @maxkoryukov
请小心使用显式的Content-Type标头.更好-不要设置 值,邮递员足够聪明,可以为您填充此标头.但, 如果要设置Content-Type:multipart/form-data-不要 忘记边界字段.
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.
这篇关于发送多部分/表单数据请求的工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!