Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported Media Type in postman

People also ask

How do you resolve unsupported media type in postman?

You need to set the content-type in postman as JSON (application/json). Go to the body inside your POST request, there you will find the raw option. Right next to it, there will be a drop down, select JSON (application. json).

What is meant by unsupported media type in postman?

A 415 Unsupported Media Type error occurs when the origin server refuses a particular request since the resource is in a format that is not supported by the server for the HTTP method used. This unsupported format type issue can be caused by what is defined in the resource's Content-Type or Content-Encoding headers.

What does unsupported media type mean?

The HTTP 415 Unsupported Media Type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format. The format problem might be due to the request's indicated Content-Type or Content-Encoding , or as a result of inspecting the data directly.

How do I change the content type on my postman?

You can set a content type header manually if you need to override the one Postman sends automatically. You can use variables in your body data and Postman will populate their current values when sending your request. To beautify your XML or JSON, select the text in the editor and then select ⌘+Option+B or Ctrl+Alt+B.


You need to set the content-type in postman as JSON (application/json).

Go to the body inside your POST request, there you will find the raw option.

Right next to it, there will be a drop down, select JSON (application.json).


Http 415 Media Unsupported is responded back only when the content type header you are providing is not supported by the application.

With POSTMAN, the Content-type header you are sending is Content type 'multipart/form-data not application/json. While in the ajax code you are setting it correctly to application/json. Pass the correct Content-type header in POSTMAN and it will work.


I also got this error .I was using Text inside body after changing to XML(text/xml) , got result as expected.

  • If your request is XML Request use XML(text/xml).

  • If your request is JSON Request use JSON(application/json)


If you are still failing with Unsupported Media Type in postman when calling a SOAP endpoint you could try:

Content-Type: application/soap+xml