邮差多部分/表格数据错误:缺少开始边界 [英] Postman multipart/form-data error: Missing start boundary

查看:154
本文介绍了邮差多部分/表格数据错误:缺少开始边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用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.

这篇关于邮差多部分/表格数据错误:缺少开始边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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