AcceptAccept tells the server which media (MIME) types the client is willing to receive in the response body, kicking off content negotiation. The server picks the most suitable representation according to these preferences.
Multiple types are comma-separated, each optionally weighted with `;q=` (0.0-1.0) to express priority. Omitting q means 1.0. For example `application/json;q=1.0, text/html;q=0.5` prefers JSON. `*/*` accepts anything, and you can wildcard just the subtype like `application/*`.
If the server can produce none of the requested types it may return 406 Not Acceptable, but in practice servers often just send a default representation rather than negotiate strictly. When the response varies by Accept, send `Vary: Accept` so caches don't serve the wrong representation.
Accept negotiates media type only; encoding, language, and charset are handled by Accept-Encoding, Accept-Language, and the legacy Accept-Charset respectively.
Accept: <media-type>[;q=<weight>][, <media-type>[;q=<weight>]]*e.g. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
<media-type> | A preferred MIME type (e.g. application/json, text/html). Wildcards `type/*` or `*/*` are allowed. |
q=<0.0~1.0> | Quality weight. Defaults to 1.0; higher means more preferred. |