request
Make an HTTP request to an external URL. The response can optionally be parsed and stored as variables for use in subsequent steps.
Request failures are soft — they set request_result but do not stop execution, so the document
can branch on the outcome without failing the inbound message.
Properties
request
An object containing the following properties.
request.url
Endpoint to call. Must be a publicly reachable URL.
request.method
HTTP method. One of GET, POST, PUT, PATCH, or DELETE.
request.headers
HTTP headers to include with the request, as a map of header name to value. Each value must be a string.
request.body
Request body. Objects are JSON-encoded automatically.
request.timeout
Timeout in seconds. Clamped to a maximum of 5.0.
request.save_variables
If true, parse the JSON response into request_response.* variables.
Variables
request writes these variables into the script context after the HTTP call completes (or is
skipped). Read them with the %{variable} syntax in subsequent steps.
request_result
Outcome of the request. Always set. One of success (request completed with a 2xx response),
failed (network error or non-2xx response), timeout (request exceeded timeout, or the
5-second platform maximum), or limit_exceeded (the document already used the maximum of
10 request calls).
request_response_code
HTTP status code from the response. Set when the request was actually sent. Absent when
request_result is limit_exceeded.
request_response_body
Raw response body, truncated to 64 KB. Set when the response had a body. Absent when
request_result is limit_exceeded.
request_response.<field>
Variables saved from the parsed JSON response when save_variables is true. Each
top-level key of the JSON body becomes a request_response.<key> path, with dotted
paths into nested objects.
For example, if the server responds with:
the variables request_response.status, request_response.time, and
request_response.number.home are set.