HTTP Accept Header
Accept HTTP header holds a value for acceptable HTTP response media types. An HTTP request without an
Accept header field implies that the user agent will accept any media type.
Accept header fields can be used to indicate that the response is limited to certain types (e.g. when requesting an image). Here is an example:
Here is another example:
Accept: audio/*; q=0.2, audio/basic
This example is interpreted as "I prefer
audio/basic, but send me any
audio type if it is the best available after an 80% markdown in quality".
Accept header field is present in an HTTP request and none of the available representations for the HTTP response have a media type that is listed as acceptable, then the origin web server can either honor the
Accept header field by sending a
406 (Not Acceptable) response or disregard the
Accept header field by treating the HTTP response as if it is not subject to content negotiation.