使用 Postman 发送(嵌套)json 对象和文件 [英] Sending (nested) json object with file using Postman

查看:47
本文介绍了使用 Postman 发送(嵌套)json 对象和文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Postman,我可以在请求中附加带有表单数据的文件,我还可以发送原始格式的嵌套 JSON 对象,但我怎样才能做到这两点:使用文件发送嵌套结构数据,例如:

With Postman, I can attach files in requests with form-data, I can also send nested JSON object in raw format, but how can I do both: sending nested-structure data with file, e.g:

"data": {
    "normal_fields": {
        "field1": "value1",
        "field2": "value2"
    },
    "image_file": <file>
}

推荐答案

尝试如下设置值并选择要上传的文件.

Try setting values like below and choose file to upload.

这篇关于使用 Postman 发送(嵌套)json 对象和文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆