Skip to content

HTTP Request

The HTTP Request node makes a full HTTP request to any URL with support for all methods, custom headers, request bodies, and multiple authentication types. Use it for API integrations, webhooks, and external service communication.

Configuration

PropertyTypeDefaultDescription
urlstring--Required. The URL to request. Supports { {input.*}} expressions.
methodstringGETHTTP method: GET, POST, PUT, DELETE, PATCH.
headersstring (JSON)--Custom headers as a JSON object (e.g., {"X-Custom": "value"}).
bodystring--Request body for POST/PUT/PATCH. Supports { {input.*}} expressions.
dataPathstring--Dot-notation path to extract from the response (e.g., data.items).
authTypestringnoneAuthentication type: none, api_key, bearer, basic.
authKeystring--Auth key name (header name for api_key, username for basic).
authValuestring--Auth value (key value for api_key/bearer, password for basic).

Authentication Types

TypeHeader Set
noneNo authentication header.
api_keyCustom header (defaults to X-Api-Key).
bearerAuthorization Bearer token.
basicAuthorization Basic (base64 encoded credentials).

Input

Accepts any data type. The input is available in { {input.*}} expressions within the URL and body config.

Output

Returns an array of row objects parsed from the JSON response. Each row includes a _status field with the HTTP status code.

json
[
  { "id": 1, "name": "Result", "_status": 200 }
]

If the response is a single object, it is wrapped in an array. If the response is not JSON, it is returned as:

json
[
  { "_body": "raw response text", "_status": 200 }
]

On error:

json
[
  { "_error": "Connection timed out", "_status": 0 }
]

How It Works

  1. Resolves { {input.*}} expressions in the URL and body.
  2. Parses custom headers from JSON.
  3. Applies authentication headers.
  4. Makes the HTTP request via wp_remote_request() with a 30-second timeout.
  5. Parses the JSON response.
  6. Navigates dataPath if configured.
  7. Adds _status to each result row.

Example Use Cases

POST form data to an external API

url: "https://api.example.com/leads"
method: "POST"
body: "{\"name\": \"`{ {input.name}}`\", \"email\": \"`{ {input.email}}`\"}"
headers: "{\"Content-Type\": \"application/json\"}"
authType: "bearer"
authValue: "sk_live_abc123"

Webhook notification

url: "https://hooks.slack.com/services/xxx/yyy/zzz"
method: "POST"
body: "{\"text\": \"New order #`{ {input.id}}` - $`{ {input.total}}`\"}"

Fetch from a protected API

url: "https://api.stripe.com/v1/charges"
method: "GET"
authType: "bearer"
authValue: "sk_live_abc123"
dataPath: "data"

Call the WordPress REST API internally

url: "`{ {input.site_url}}`/wp-json/wp/v2/posts"
method: "GET"
dataPath: ""

WARNING

HTTP Request is a write node -- it is never cached by the pipeline deduplication system. Each execution makes a real HTTP request.

TIP

For simple GET requests to fetch data (source node behavior), the REST API source node may be more appropriate.