Supported HTTP Header Fields

HTTP header fields are components of request and response messages in Hypertext Transfer Protocol (HTTP) that carry information and define the operating parameters of an HTTP transaction. They represent the meta-data associated with the API request and response.

Supported Request Headers

Here are the various HTTP header fields that can be used in a request:

  • Accept: The media type that indicates the accepted media types in the response. You must specify this information whenever a response body is expected.
  • ContentLength: The size of the request body in bytes. You need to specify this for requests that contain a request body.
  • ContentType: The type of the content in the response body. You need to specify this for requests that contain a request body.
  • Host: The internet host and port number as in the original URI. The origin server uses it to support multiple host names on a single IP address.

Supported Response Headers

Here are the various HTTP header fields that can be received in a response:

  • Location: The canonical URI of the newly created resource. The URI can be used to make various requests on the resource.
  • Contentlength: The size of the response body in bytes. It's returned in responses that contain a response body.
  • Contenttype: The type of the content in the response body. It's returned in responses that contain a response body.
  • Transfer-Encoding: Chunked: This header is used in responses that have the response body defined but the server doesn't specify the content length.