Content-Type header missing
- Where to look
- The request headers in DevTools or your HTTP client
- Fix
- Add a Content-Type that matches the body, such as application/json
HTTP 415 means the server refuses the request body's format. Check Content-Type and Content-Encoding, send a type the endpoint accepts, and fix the server.
HTTP 415 Unsupported Media Type means the server refuses the request because the content is in a format that method does not support on that resource. The cause is the request's Content-Type or Content-Encoding, or the data itself. Send a body type the endpoint accepts, and set the Content-Type header to match it.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
This is a request-side error: the client sent a body the endpoint will not take. It is not a crash, and retrying the same request will fail the same way. The server is working as configured; the mismatch is between what was sent and what the route accepts.
curl -i -X POST https://example.com/comments \
-H "Content-Type: application/json" \
-d '{"user":"belgin","comment":"LGTM!"}'HTTP/1.1 415 Unsupported Media Type
Accept-Post: application/json; charset=UTF-8
Content-Length: 0RFC 9110 says a server can use the Accept response header to list the media types it would have accepted, or Accept-Encoding for content codings. MDN's examples show an Accept-Post header naming the required type.
Open the failing request in DevTools or run it with curl -v. Check the Content-Type and Content-Encoding you actually sent, not what your code intended.
Set the Content-Type header to match the body. MDN notes some servers are strict, and that sending UTF8 instead of UTF-8 for the charset may make the server consider the media type invalid.
If the client is right, confirm the route is configured to read that type, for example a JSON parser enabled for the path. Return the Accept-Post or Accept header so clients learn what is allowed.
4 questions people ask next, answered from the sources on this page.
It is the HTTP status for Unsupported Media Type. The server refused the request because the body's format, as given by Content-Type or Content-Encoding or found in the data, is not supported for that method and resource.
Set the Content-Type header to match the body you send, spell it exactly, and use a type the endpoint accepts. If the client is correct, enable that type on the server route.
No. A 400 covers requests the server sees as malformed in general. A 415 is specific to the body's media type or content coding not being supported.
It can. RFC 9110 says the Accept response header can list accepted media types, and Accept-Encoding can list accepted content codings. Not every server sends them.
Run the free audit, then approve the fixes. Every change can be undone.