使用Postman发送(嵌套)json对象和文件 [英] Sending (nested) json object with file using Postman
本文介绍了使用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屋!
查看全文