415 Unsupported Media Type
The HTTP status meaning the server will not read the request body because it is in a format it does not accept.
In more detail
It tells the client to change its encoding, not its data. For example, a form-encoded body sent to an endpoint that only reads JSON.
Example
In the APIs course: The course service answers 415 to a form-encoded body when it expects JSON.Related terms
- Content-Type — The header that states what format a message body is in, such as application/json.
- media type — A standard label for a data format, written type/subtype, such as application/json or text/event-stream.
- 422 Unprocessable Content — The HTTP status meaning the request body is in the right format and parses, but its contents cannot be acted on.
Taught in
- HTTP Methods And Status Codes — Modern API Architecture: REST, GraphQL & gRPC