406 Not Acceptable

The HTTP status meaning the server cannot produce any format the Accept header asked for.

In more detail

Answering 406 is more honest than sending a format the client said it cannot read. A server may instead choose to send its default format, but it must never claim a format it did not send.

Example

In the APIs course: The course service is JSON only, so Accept: application/xml gets 406 with a problem document.

Related terms

Taught in

References