Skip to main content
Feedback

HTTP Callout Policy

The callout-http policy invokes an HTTP(S) URL and places a subset or all of the content in one or more variables of the request execution context.

This can be useful if you need some data from an external service and want to inject it during request processing.

The result of the callout is placed in the calloutResponse variable and is only available during policy execution. If a variable is not configured, the result of the callout is no longer available.

Timing

On RequestOn Response
XX

Configuration

PropertyRequiredDescriptionTypeDefault
methodyesHTTP Method used to invoke URL. Options are: CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACEHTTP methodGET
urlyesURL invoked by the HTTP client (supports EL).URL
headersnoList of HTTP headers used to invoke the URL (supports EL).HTTP headers
bodynoThe body content send when calling the URL (supports EL).string
fireAndForgetnoMake the HTTP call without expecting any response. When activating this mode, context variables and exit on error are ignored.booleanfalse
variablesnoThe variables to set in the execution context when retrieving content of HTTP call (supports EL).List of variables
exitOnErroryesTerminate the request if the error condition is true.booleanfalse
errorConditionnoThe condition that will be verified to end the request (supports EL).string{#calloutResponse.status >= 400 and #calloutResponse.status ⇐ 599}
errorStatusCodenoHTTP Status Code sent to the consumer if the condition is true.int500
errorContentnoThe body response of the error if the condition is true (supports EL).string

Example

"policy-http-callout": {
"method": "GET",
"url": "https://api.boomi.io/echo",
"headers": [ {
"name": "X-Boomi-Request-Id",
"value": "{#request.id}"
}],
"variables": [{
"name": "my-server",
"value": "{#jsonPath(#calloutResponse.content, '$.headers.X-Forwarded-Server')}"
}]
}

On this Page