HTTP 415 Unsupported Media Type

A media disc sits beside a reader designed for rectangular cards

HTTP 415 Unsupported Media Type means the request content uses a format the method or target does not support. Servers may reject the declared Content-Type, the body’s encoding, or the actual bytes after inspecting them.

Inspect the request body and its metadata together

If an endpoint expects JSON, configure your client to serialize the data as JSON and send the documented media type. A multipart upload needs matching boundaries in the header and the body. If you use compression, first confirm the target accepts the requested Content-Encoding.

Compare what the application received

Check body size and header values in a safe test before and after the gateway. A client that changes serialization between direct and proxied requests can produce a misleading comparison. For valid, recognized content whose instructions fail application validation, see 422.

Example of a body that looks like JSON

Suppose POST /api/events carries {"type":"ping"} and declares Content-Type: text/plain. If the endpoint is configured for JSON, it may return 415 even when the bytes could be parsed as JSON. Use the client library’s JSON option so it sends the serialized body with the documented media type. If the endpoint accepts a vendor-specific type, match the exact value in the API documentation. For file uploads, have the multipart library set the boundary parameter from the body it actually creates.

Check for a content coding the server cannot decode

A JSON request can carry Content-Encoding: gzip when the client compresses it. On a failing proxy path, compare that header and the body encoding with what the application expects. If you own the service, reproduce with a small uncompressed body and use the request ID to find where 415 was raised. Test the compressed form only where the API documents support. If the server cannot produce the response type requested in Accept, it may use 406 Not Acceptable.

RFC 9110.

All HTTP status codes · All proxy testing guides · Open the proxy tester