[英]Postman with "body" (json) and files (multipart) together in 1 restful request
How do I use Postman to send queries with body (in json format) and files (in multipart) format at the same time?如何使用 Postman 同时发送正文(json 格式)和文件(多部分)格式的查询?
I think I should use Postman->Body->Raw although I can't find an example on the Web. Anyone can kindly teach me?我想我应该使用 Postman->Body->Raw,虽然我在 Web 上找不到例子。有人可以教我吗? Thank you!
谢谢!
In postman, set method type to POST .在 postman 中,将方法类型设置为POST 。
Then select Body -> form-data -> Enter your parameter name ( file according to your code)然后 select Body -> form-data -> Enter your parameter name ( file according to your code)
On the right side of the Key field, while hovering your mouse over it, there is a dropdown menu to select between Text/File .在 Key 字段的右侧,将鼠标悬停在它上面时,在Text/File之间有一个指向 select 的下拉菜单。 Select File, then a "Select Files" button will appear in the Value field.
Select 文件,然后“选择文件”按钮将出现在“值”字段中。
For rest of JSON data , you can click on raw and enter your JSON data there.对于 JSON数据中的 rest,您可以单击原始数据并在那里输入您的 JSON 数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.