Reputation: 81
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
Upvotes: 8
Views: 56754
Reputation: 355
In my case for PUT call, I set Body to "raw" and added "Content-Type" to "application/json"
Upvotes: 12
Reputation: 51
In my case, I was creating a Web API 2.1 project in VS 2017 and I got the same problem. I just should disable SSL. The route to disable is right click on name project > properties > Debug > Anable SSL.
Upvotes: 0
Reputation: 866
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.
Upvotes: 8