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.
这篇关于邮递员多部分/表单数据错误:缺少开始边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:邮递员多部分/表单数据错误:缺少开始边界
基础教程推荐
- 将 Windows 证书导入 Java 2022-01-01
- 在springboot中如何给mybatis加拦截器 2023-04-29
- doFilter()是在servlet的工作完成之前还是之后执行的? 2022-01-01
- JPA惰性列表上的流 2022-01-01
- 将 double 转换为 Int,向下舍入 2022-01-01
- Maven:无效的目标版本:10 2022-01-01
- Java ECDSAwithSHA256 签名长度不一致 2022-01-01
- 在java中使用xpath和selenium解析HTML表格数据 2022-01-01
- 控制台应用程序中的 Java 键盘输入解析 2022-01-01
- 如何在相机中应用自定义滤镜 [Surfaceview 预览]. 2022-01-01
