【发布时间】:2013-10-11 07:25:54
【问题描述】:
我正在努力使用 Postman Chrome 扩展程序创建 POST 多部分/混合请求
这是我的 curl 请求,效果很好
curl -H "Content-Type: multipart/mixed"
-F "metadata=@simple_json.json; type=application/json "
-F "content=@1.jpg; type=image/jpg" -X POST http://my/api/item -i -v
回复中有趣的部分
内容长度:41557
期望:100-继续
内容类型:多部分/混合;边界=----------------8aaca457e117
- 其他东西不好 transfer.c:1037: 0 0
- HTTP 1.1 或更高版本,具有持久连接,支持流水线
当我使用 Postman 时
我得到这样的回应
{"message":"Could not parse multipart servlet request;
nested exception is org.apache.commons.fileupload.FileUploadException:
the request was rejected because no multipart boundary was
found","type":"error","status":500,"requestId":"1861eloo6fpio"}
就是这样 - 我希望摆脱这个错误。 如果需要更多信息,请询问:)
【问题讨论】:
标签: google-chrome curl http-headers postman http-request