Representation header

A representation header (or 'representation metadata') is an HTTP header that describes how to interpret the data contained in the message.

For example, the content in a particular message might be encoded for transport, the whole resource might be formatted as a particular media type such as XML, JSON, HTML or Markdown, localized to a particular written language or geographical region, and/or compressed using a particular algorithm. The representation headers allow the underlying data to be extracted and understood. The underlying resource is semantically the same in each case, but its representation is different.

While representations are different forms of resources, representations can themselves also be transmitted in various forms: an HTTP message frames (cf., e.g., HTTP/1.1's Transfer-Encoding), a particular stream of octets (cf., e.g., Content-Range) derived from the selected representation.

Clients specify the formats that they prefer to be sent during Content Negotiation (using Accept-* headers), and the representation headers tell the client the format of the selected representation they received.

Representation headers may be present in both HTTP request and response messages with various methods. If sent as a response to a HEAD request, they describe the body content representation that would be selected if the resource was requested with a GET request.

Representation headers include:

Representation headers are not mutually exclusive with content headers.

See also