Skip to content

HTTP Request

Overview

The http_request node sends a single HTTP request to an external endpoint and passes the response into the workflow. It supports all common methods (GET, POST, PUT, PATCH, DELETE), custom headers, and an arbitrary body. Use it to call third-party REST APIs, push events to webhooks, or fetch remote data that feeds downstream nodes. The node does not retry automatically; wrap it in a try_catch node if resilience is needed.

Configuration

FieldTypeRequiredDefaultDescription
urlstringYesThe full URL to call, including scheme and path. Supports {{variable}} interpolation from workflow variables.
methodstringYes"GET"HTTP method: GET, POST, PUT, PATCH, or DELETE.
headersobjectNo{}Key-value map of request headers. Use this for Authorization, Content-Type, and other standard headers.
bodystringNoRequest body as a raw string. For JSON payloads set Content-Type: application/json in headers and stringify the object. Ignored for GET and DELETE.
timeout_msnumberNo10000Maximum milliseconds to wait for a response before the node fails with a timeout error.
follow_redirectsbooleanNotrueWhether to automatically follow HTTP 3xx redirects. Set to false to capture the redirect response directly.
response_encodingstringNo"utf-8"Character encoding for the response body: "utf-8" or "base64". Use "base64" for binary responses.

Inputs

PortTypeDescription
inputobjectUpstream data available for {{variable}} interpolation in url, headers, and body.

Outputs

PortTypeDescription
outputobjectContains status (number), headers (object), and body (string or parsed JSON if response Content-Type is application/json).
errorobjectPresent on network failure or timeout; contains message, code, and status (when the server responded with a 4xx/5xx).

Example

json
{
  "nodeType": "http_request",
  "config": {
    "url": "https://api.example.com/v1/summarise",
    "method": "POST",
    "headers": {
      "Content-Type": "application/json",
::: v-pre
      "Authorization": "Bearer {{env.API_KEY}}"
:::
    },
::: v-pre
    "body": "{\"text\": \"{{input.content}}\", \"max_words\": 100}",
:::
    "timeout_ms": 15000,
    "follow_redirects": true
  }
}

Notes

  • HTTP 4xx and 5xx responses are not automatically treated as errors — the node succeeds and the status code is available in output.status. Add a switch or if_condition node downstream to branch on status if needed.
  • Environment secrets (API keys, tokens) should be stored as workflow environment variables and referenced via {{env.VARIABLE_NAME}} rather than hardcoded in headers or body.
  • The node enforces a hard ceiling of 60 000 ms regardless of timeout_ms to prevent a single step from blocking the worker indefinitely.
  • Response bodies larger than 10 MB are truncated; for large file transfers use object_storage_upload / object_storage_download nodes instead.