Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 415 Unsupported Media Type while executing list REST API from post man

Tags:

postman

I am using List REST API for loading Party data. Using the details below:

Request type : POST
URL : http://localhost:1512/rest/V1.0/list/Party
Authorization : Yes
Header : No Header information
Body : form Data ->xml file.

When I send request I am getting below error. Can you please help me.

http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
Error 415 Unsupported Media Type
like image 284
krish Avatar asked Feb 23 '17 10:02

krish


People also ask

How do I fix 415 unsupported media type?

Fixing 415 Unsupported Media Type errorsEnsure that you are sending the proper Content-Type header value. Verify that your server is able to process the value defined in the Content-Type header. Check the Accept header to verify what the server is actually willing to process.

How do you select media type in Postman?

To do this, open Postman and create a new request by selecting New->Request from the top left: Under Headers, select Key = Content-Type: For Value, select application/json: THANKS FOR READING.


1 Answers

You will need to include a header in your post request. Add a value under headers in Postman to include a key for Content-Type with a value of application/xml. You may also want to try a value of text/xml depending on what your body content is.

Here's a link for info on the difference between text/xml and application/xml.

like image 92
jhovanec Avatar answered Oct 06 '22 13:10

jhovanec