Header
The header holds the key and value for a given HTTP operation that you want to execute. The connector sends these key value pairs as part of the header in HTTP requests.
For example, the following example displays a sample key value pair, where Authorization
is the header Key and $application.accesstoken$
is the Value.
Authorization – $application.accesstoken$
Content-Type – application/json
Note
If you don't provide the content type in the Header, the source will set Content-Type as application/json
.
-
Enter the header Key used for the operation.
-
Enter the Value of the header key used for operation.
-
Select Save.
Content Types
-
JSON request, JSON response:
Content-Type= application/json (optional), Accept (optional)
-
XML request, XML response:
Content-Type= application/xml or text/xml or */xml (required), Accept (optional)
-
JSON request, XML response:
Content-Type= application/json (optional), Accept = application/xml or text/xml or */xml (required)
-
XML request, JSON response:
Content-Type= application/xml or text/xml or */xml (required), Accept = application/json (required)
Support for Expression Language in the Header Values
The web services connector supports expression language in the Header. To use expressions in the Header, wrap them with _#
.
The following objects can support expression language when you use them with placeholders:
-
Response
-
Plan
-
Application
For example, the following example displays sample key value pairs:
Count - _#2+2_#
Service-Name - _#$application.serviceName$.concat('service')_#