HTTP-request step

These cube allow send many http requests to another hosts.

HTTP-request step allows you to interact with HTTP & REST APIs

1. Set request method, paste URL and add parameters

You can add parameters both in URL input, like{{field}} or using Parameters tab. Feel free to add {{fields}} using template system.

Remember that if parameter value contains characters like " ", "+", "", wrap it in {{#encodeURIComponent}} parameter value {{/encodeURIComponent}}

2. Optional: Add headers and Body

You can add headers and body for your request, using template system.

Note that choosing the body type (json, x-www-form-urlencoded) you add specific headers.

If your JSON-body includes strings with special characters (like "), wrap it with {{#escape}}wrapped "text"{{/escape}}

3. Optional: Setup auth

Choose the proper auth (or no one) and the authorisation header will be automatically generated when you send the request.

4. Optional: Add custom options

  • Save API response to the field. Field should be type of json or string. It's easy to parse the response using JSON-step.

  • Ignore HTTP-errors. If this option is turned off, scenario will stop executing and call Catch error step, if any. If it is on, the scenario will continue executing.

  • Enable retry. Retry the request in case of error-code.

  • Retry non idempotent requests (e.g. POST). have a look at a nice explanation what is non idempotent requests.

  • Retry count. How many times retry connecting.

  • Read timeout, ms. Max 180000 — 180 sec.

  • Connect timeout, ms. Max 5000 — 5 sec.

  • Certificates. Add (if needed) .PEM text and key

  • Proxy. Add (if needed) proxy. You may have one here (choose IPv4).

5. Sending files

Set the content type to multipart/form-data

Body for that type of request should be the following:

	"file": "{{ContextVar.fileUrl}}", // URL of your file

Last updated