Applies to: Protocol and format interpretation for developers inspecting authorized media delivery.
The useful distinctions
- Accept can list multiple media types.
- Quality values express relative preferences.
- The selected response format is communicated by Content-Type.
Write preferences as a ranked list
The synthetic request gives JSON a preference of one, XML a preference of one half, and text/plain a value of zero. Turning those numbers into a tiny ranked list makes the request readable without pretending it is a player codec inventory. The field describes acceptable representation types in this request context. It does not enumerate every track type that a television or playback application can decode.
Inspect the selected result independently
A server's response still needs to be examined: status, Content-Type, and content determine what was actually returned. Do not report that XML was converted to JSON merely because a request preferred JSON. The service may have only one available representation, may apply its own selection policy, or may reject negotiation. If an endpoint offers multiple representations under one URL, a cache review must also consider how that selection is distinguished. Keep the negotiation exercise bounded to a known resource and authorized request context. Copying an Accept field from an unrelated browser request can introduce preferences that have no meaning for the metadata being investigated. In this invented preference list, JSON outranks XML and plain text is excluded. That conclusion concerns the request's declared preferences; it does not establish which representations the origin actually has available.
Worked example · synthetic
The example ranks JSON above XML and excludes text/plain from this stated preference list. It does not force an origin to produce a JSON representation that does not exist.
Synthetic text example; no network operation has been performed.
HTTP/MIME line endings are CRLF. Request URL context, where labelled, is commentary rather than a wire field. No message was transmitted.
GET /samples/catalogue HTTP/1.1
Host: media.example.invalid
Accept: application/json;q=1, application/xml;q=0.5, text/plain;q=0
Check the interpretation
- Parse q as a preference rather than a bitrate.
- Inspect the returned Content-Type.
- Do not treat Accept as a hardware codec capability list.