Representation header
Arepresentation header (or 'representation metadata') is anHTTP 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'sTransfer-Encoding), a particular stream of octets (cf., e.g.,Content-Range) derived from theselected representation.
Clients specify the formats that they prefer to be sent duringContent Negotiation (usingAccept-* headers), and the representation headers tell the client the format of theselected representation they received.
Representation headers may be present in both HTTP request and response messages with various methods.If sent as a response to aHEAD request, they describe the body content representation thatwould be selected if the resource was requested with aGET request.
Representation headers include:
Content-LengthContent-RangeContent-TypeContent-EncodingContent-LocationContent-LanguageValidators used inconditional requests, such as:
Representation headers are not mutually exclusive withcontent headers.