A 415 Unsupported Media Type error specifies that the origin server refused a particular request. This happens when the requested resource is not in a format that is supported by the server.
Here at Bobcares, we have seen several such HTTP errors as part of our Server Management Services for web hosts and online service providers.
Today we’ll take a look at the causes for this error and see how to fix it.
What causes 415 Unsupported Media Type error to occur
This unsupported format type error occurs when a valid Content-Type or Content-Encoding headers are not specified.
We can include a Content-Type header in both request and response headers. We use this to tell the server what the data actually is.
A form submission website is a good example to it. In form submission, we use a POST method to send data to the server. Here Content-Type header is used so that the server will know what type of data is being sent.
In case, if the server is not able to process the Content-Type value of the request then it will throw 415 unsupported error.
How we fix 415 Unsupported Media Type error
Here are the suggestions that our Support Engineers provide to our customers to tackle this error message.
- Make to send proper Content-Type header value.
- Verify that the server will be able to process the value that is specified in the Content-Type header.
- Verify what the server is willing to do by checking the Accept header.
In short, you just need to examine what exact content types the origin server is able to process and what the client is requesting. Based on these details, you can either modify the request or configure the server to accept the Content-Type value sent from the client.
[Need any further assistance in fixing HTTP errors? – We are here to help you.]
Conclusion
In short, this error occurs when the origin server refuses a particular request due to the requested resource not being in a format that is supported by the server. Today, we saw how to fix this error.
0 Comments