The REST Adapter provides an easy and configurable way to consume an external HTTP service. You can configure the HTTP verb, resource URI, query and template parameters, HTTP headers, form parameters, body, and attachments that must be sent as part of the request.
Description of the illustration http_request.png
HTTP headers allow the client and the service to exchange additional information along with the request or the response. The Internet Assigned Numbers Authority (IANA) maintains a registry of standard or permanent HTTP request headers that are commonly used for predefined reasons. Along with the standard headers, services can also define custom proprietary headers for exchanging additional information.
Follow the steps mentioned below to invoke a REST service that expects a custom HTTP request header.
Create a connection with a REST Adapter invoke connection for the target service to consume.
Drag the connection onto the integration canvas.
On the Basic Info page, provide the HTTP verb and the relative request URI.
Select the Configure Custom Request Header check box.
The REST Adapter shows a page for you to configure the custom request headers.
Define the proprietary header name and provide a brief description of the header.
Upon completion, the REST Adapter exposes the custom header specified above as part of the adapter request payload.
Assign this header a value using an assign action or the mapper. The assigned value is sent as a custom HTTP header to the target service at runtime.