HTTP Headers

HTTP Headers
lac42
You can change the behavior of the API engine by specifying 
one
 of the following HTTP headers as part of your requests:
 
 
Authorization
The 
Authorization
 HTTP header provides the authentication token as part of a request. Most REST calls must include an authentication token.
If you have specified an HTTP authentication provider as the authentication provider for your API, then this header is might not be relevant. The authentication provider handles authentication in a different way typically.
For more information about HTTP authentication providers, see Authenticate API Users using an HTTP Authentication Provider.
 
Example:
 
 
Authorization: CALiveAPICreator abcdef123456:1
The 
:1
 suffix at the end of the authentication token is required. 
Content-Type
The 
Content-Type
 HTTP header specifies the format of the payload (for example, JSON and XML). This HTTP header is applicable only for POST and PUT.
Example:
 
Content-Type: application/json
Accept
The 
Accept
 HTTP header is applicable to all requests. It indicates the format the caller can handle in the request.
The default response format is JSON. You can change this response format.
You can set the expected response format globally across your API. For more information about how to do this, see API Properties.
Example:
 
Accept: application/json,application/xml
Forwarded
The 
Forwarded
 HTTP header indicates that the API user is forwarding the request on behalf of another caller. Gateways often used this HTTP header.
Example:
 
The following HTTP header changes the base URLs in the response to the protocol, host, and port number that you specify. For more information about the RFC 7239 standard, see the ietf.org site.
Forwarded: host="acme.com:1234";proto="https"
X-Forwarded-Host/Proto/For
The 
X-Forwarder-Host/Proto/For
 HTTP header is equivalent to the 
Forwarded
 HTTP header. The 
Forwarded
 HTTP header is the preferred header.