Header Values
The most relevant REST request header values for our backend REST APIs are the following:
Field Name | Description | Example Values | Usage Comment |
---|---|---|---|
Accept | Format of the function call response that is desired. | application/json or application/xml | Setting a value is required. |
Content-Type | Format of the request content. | application/json or application/xml | Required for POST but not for GET. |
In the following example, the requested resource is a JSON
object:
curl --request POST \
--url 'https://rest.cleverbridge.com/urlgenerator/generateusersessionurl' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '{
"TargetUrl": "https%3A%2F%2Fwww.cleverbridge.com%2F864%2F%3Fscope%3Dcheckout%26amp%3Bcart%3D97771%26amp%3Blanguage%3Den%26amp%3Bcurrency%3DUSD%26amp%3Bx-source%3Dwebsite-visit-05.2019
}'
Updated almost 2 years ago