javamultipartpostman

Postman multipart/form-data error: Missing start boundary


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?

enter image description here


Solution

  • 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.

    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.