HTTP Headers
HTTP Request Headers
The Intelligent Advisor REST API supports the following HTTP headers that may be passed in the header section of an HTTP request.
| Request Header | Description | Example |
|---|---|---|
Accept
|
List of acceptable media types for a response. |
Accept: application/json, application/zip, text/csv
|
Content-Type
|
Media type of the body of the request. Required for POST, PUT, and PATCH requests.
|
Content-Type: application/json
|
If-Match, If-None-Match
|
A conditional request; dependent on whether the supplied ETag value is matched, or not matched.
|
If-None-Match: "...etag value..."
|
Origin
|
The origin domain of the page requesting the resource. Part of the Cross-Origin Resource Sharing (CORS) mechanism. |
Origin: http://example.com
|
HTTP Response Headers
The Intelligent Advisor REST API supports the following HTTP headers that may be passed in the header section of an HTTP response.
| Response Header | Description | Example |
|---|---|---|
Access-Control-Allow-Headers
|
The non-simple HTTP headers allowed for Cross-Origin Resource Sharing (CORS) requests to this resource. |
Access-Control-Allow-Headers: Content-Type, Authorization
|
Access-Control-Allow-Methods
|
The HTTP methods allowed for Cross-Origin Resource Sharing (CORS) requests to this resource. |
Access-Control-Allow-Methods: GET, POST, PATCH
|
Access-Control-Allow-Origin
|
The origin domain allowed for Cross-Origin Resource Sharing (CORS) requests. |
Access-Control-Allow-Origin: http://example.com
|
Allow
|
In response to an OPTIONS request, specify which HTTP methods are allowed by this resource.
|
Allow: GET, POST, PATCH, OPTIONS
|
Cache-Control
|
Indicates how to cache this response, in conjunction with other cache-related headers, such as ETag and Last-Modified.
|
Cache-Control: private
|
Content-Length
|
The calculated content length of the response. |
Content-Length: 338
|
Content-Type
|
Media type of the body of the response. Not supplied for responses where a content body is not supplied. |
Content-Type: application/json
|
ETag
|
A fingerprint value, indicating the uniqueness of the given response. Supports caching and conditional-GET requests.
|
ETag: "...fingerprint value..."
|
Last-Modified
|
Indicate the time the resource was last modified. |
Last-Modified: Thu, 15 Jun 2017 05:37:27 GMT
|
Vary
|
Indicates which HTTP headers affect the cacheability of the response. A cache will know to check the specified headers when determining the uniqueness of a cache value. |
Vary: Accept, Origin
|