简体   繁体   中英

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?

I think I should use Postman->Body->Raw although I can't find an example on the Web. Anyone can kindly teach me? Thank you!

In postman, set method type to POST .

Then 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 . Select File, then a "Select Files" button will appear in the Value field.

For rest of JSON data , you can click on raw and enter your JSON data there.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM