Configure a REST Adapter to Consume a REST API that Expects Custom HTTP Header Properties

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 http_request.png follows
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.

  1. Create a connection with a REST Adapter invoke connection for the target service to consume.

  2. Drag the connection onto the integration canvas.

  3. On the Basic Info page, provide the HTTP verb and the relative request URI.

  4. Select the Configure Custom Request Header check box.

    The REST Adapter shows a page for you to configure the custom request headers.

  5. 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.

  6. 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.