HTTP Client Activity

The HTTP Client activity invokes a configured service endpoint. HTTP Client activity works only with the HTTP Server trigger, it should not be used with any other trigger and vice versa.

Settings

Field Required Description

Service Endpoint

Yes

Configure a service endpoint in the format http(s)://host:port/<optional_context_path>

Example: http://myservice.com or https://myservice.com/demo

Note: For Proxy mode, you can also set <optional_context_path> from the Input section. For Data mode, pathParams can be mapped to pass the path parameter in the request URL.
Processing Mode Yes

Proxy Mode: In this mode, request/response is opaquely passed to/from the HTTP Client activity. So, request/response payload, request/response headers, path parameters, invocation method, and so on, are not accessible inside the flow.

This mode must be used along with HTTP Server for pass through proxy implementation.

Note: When HTTP Client activity is configured with the Proxy mode then the flow cannot be tested in the flow tester.

Data Mode: In this mode, input parameters like path, query, and headers are passed to the HTTP Client from the HTTP trigger. These parameters can also be coerced to use JSON schema in the Input settings. These parameters are accessible inside the flow.

Timeout (ms) Yes

Specify the timeout period in milliseconds for invoking a service. If a timeout value is specified, the activity waits for the specified time. If the response is not received within the specified time, the request expires with an error.

The default value is zero (0) that is, there is no timeout for invoking a service.

Input

The proxy data received from the flow input can be mapped with the proxy data of the HTTP Client activity. You can map contextPath with application property or pass values directly.

The Input tab has the following fields for Proxy mode:

Field Required Description
contextPath No Optional context path for the request. When set, the context path is prefixed to the request.
proxyData Yes A proxy data received from the trigger. Available when processing mode is set to Proxy. This should be mapped from HTTP Server output.
excludeRequestHeaders No A comma (,) separated name of headers to be omitted from original request before sending request to the service. You can specify * to omit matching headers. For example, "X-*,MyHeader". In this case, all headers starting with 'X-' would be omitted from the request.
excludeResponseHeaders No A comma (,) separated name of headers to be omitted from response before sending response back to the original client. You can specify * to omit matching headers. For example, "X-*,MyHeader". In this case, all headers starting with 'X-' would be omitted from the response.

HTTP params, headers, method, and body received from the flow input can be mapped and modified using coercing.

The Input tab has the following fields for Data mode:

Field Required Description
pathParams No

Map the value of the path parameter which needs to be passed in the Service Endpoint URL. For Data mode, pathParams can be defined in the Service Endpoint URL.

Example: //host:port/<basepath>/{pathparam} the value of this pathParam can be mapped here. Path parameters can be coerced to use JSON schema.

queryParams No Query parameters to be appended to the path. Query parameters can be coerced to use JSON schema.
headers No Request headers that are passed with the request. Headers can be coerced to use JSON schema.
method Yes

Supported HTTP methods are: GET, PUT, POST, DELETE, and PATCH. Method can be mapped from the HTTP trigger or literal values can be passed.

Note: Default is set to GET.
requestBody No Request body for the request being made by the HTTP Client activity. For POST, PUT, and PATCH methods request can be mapped here. This field can be coerced to use JSON schema.

Coercing with Schema

To coerce any parameter, click the ellipses button and select the Coerce with schema option to enter JSON schema. Only specified param in the schema will be appended. In case of no schema, all mapped params get appended.

Output

The Output tab displays the statusCode, headers, responseBody, and cookies received in the response in a tree format. These values can be mapped to Return activity to send the response back to the HTTP Trigger in the Data mode.

Field Description
statusCodeOutput HTTP status code from HTTP Client activity.
headersHeaders from the HTTP call made in the HTTP Client activity.
responseBodyresponseBody from the HTTP call made in the HTTP Client activity.
cookiesCookies from the HTTP call made in the HTTP Client activity.
Note: Headers, cookies, and responseBody can be coerced with schema.