Skip to main content
?

request

Summary​

Executes an HTTP request

Description​

Fields​

url​

The URL as a string pattern with variables {protocol}://{host}:{port}.

variables​

The variables to be injected into the URL pattern.

body​

The request body can be any value. If the body is anything other than a string, it will be JSON encoded into the body and the content-type header will be set to application/json.

method​

The request method: get, delete, post, put, head, options, patch.

The request headers as an object.

query​

The request query as an object.

decode-body​

Determines whether the body should be decoded into usable data or left as a string.

timeout​

Returns an error if the result does not progress within 'Timeout'.

onError​

This will be performed only if there is a protocol related error such as connectivity issues or timeouts. The 'error' scope will include type and message. The result of this handler will replace the error result of this action.

stopOnError​

This will determine whether the execution should stop after a protocol related error. This will effectively reraise the original error after any onError handler.

onErrorCode​

This will be performed only if the response status code is not in the 200 suite. The 'error' scope will include the http response. The result of this handler will replace the error result of this action.

stopOnErrorCode​

This will determine whether the execution should stop after a status code outside the 200 suite. This will raise an error with a simple HTTP error message.