topic
Verified 2026-09-18Content Negotiation
Content negotiation selects the representation that best matches a request and the server's available variants.
Use Accept, Accept-Encoding, and Accept-Language to negotiate media type, content coding, and language. Send Vary when the selected response changes with a request field.
httprepresentationscacheheader
Reference (http)
Accept: application/json Accept-Encoding: br, gzip Accept-Language: en-US, de;q=0.8
Use Accept, Accept-Encoding, and Accept-Language to negotiate media type, content coding, and language. Send Vary when the selected response changes with a request field.
Common mistakes
- Ignoring the client's preferences or forgetting Vary, which can make a cache serve one variant to another request.