Postman multipart/form-data error: Missing start boundary(邮递员多部分/表单数据错误:缺少开始边界)
问题描述
我正在尝试使用 Postman 发送的 multipart/form-data
请求访问我的服务器端点.我收到 400 错误请求,原因是:
I'm trying to hit my server's endpoint with a multipart/form-data
request sent from Postman. I'm getting a 400 Bad Request and the cause is:
org.jvnet.mimepull.MIMEParsingException: Missing start boundary.
如何设置起始边界以及如何知道它应该是什么?
How can I set the start boundary and how do I know what it should be?
推荐答案
https://github.com/postmanlabs/postman-app-support/issues/191 在此线程之后,似乎将请求标头设置为 Content-Type multipart/form-data 我正在覆盖 Postman 设置的值.
https://github.com/postmanlabs/postman-app-support/issues/191 Following that thread here seems that setting the request header to Content-Type multipart/form-data I'm overriding the value set by Postman.
无需手动添加内容类型标头.你是覆盖 Postman 设置的值.只需在 POST 中选择表单数据请求并发送您的请求,看看它是否有效.
There is no need to add a content-type header manually. You are overriding the value set by Postman. Just select form-data in POST request and send your request to see if it works.
删除标头允许我到达我的端点.
Removing the header allowed me to hit my endpoint.
这篇关于邮递员多部分/表单数据错误:缺少开始边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:邮递员多部分/表单数据错误:缺少开始边界


基础教程推荐
- Java Swing计时器未清除 2022-01-01
- 从 python 访问 JVM 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- 大摇大摆的枚举 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- 多个组件的复杂布局 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01