20

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

Vladimir Vagaytsev
  • 2,871
  • 9
  • 33
  • 36
Anton Belev
  • 11,963
  • 22
  • 70
  • 111
  • I don't know Postman so I can't answer your question, but the boundaries delimit each part of a multipart/* message. It is first defined in the message main part then used in between each part. It is expected that Postman should handle this kind of technical details, so just make sure you use it correctly. – Aaron Oct 16 '15 at 15:36
  • 1
    very strange, if I remove the Content-Type multipart/form-data from my header I'm able to hit my endpoint ... – Anton Belev Oct 16 '15 at 15:41

3 Answers3

34

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.

Anton Belev
  • 11,963
  • 22
  • 70
  • 111
  • 1
    Removing the header is causing the header to be set to `multipart/octetstream` which is causing `"Content type 'application/octet-stream' not supported"` – shyam Mar 22 '17 at 13:06
8

Overriding POSTMAN header values is the issue as mentioned by Anton above. Here is how your headers and request body should look like for standalone POSTMAN client:

Request Headers Request Body

realPK
  • 2,630
  • 29
  • 22
-1

As a work around try this:

spring: jersey: application-path: /rest # Path that serves as the base URI for the application. Overrides the value of "@ApplicationPath" if specified. filter.order: 0 # Jersey filter chain order. type: servlet # Can be either "servlet" or "filter". init.*:

type servlet worked fine, where as filter is throwing the Start Boundary error.