HTTP request

I/O and network
HTTP request
Success
URL
Error
Method(HTTP method) GET
Response(HTTP response)
Headers(HTTP headers)
Body(Output stream)
Credentials(HTTP credentials)

Description

Sends an HTTP request and returns the raw response object. Branches on success/error; pass the response into a Break node to inspect status, body, or headers. The body input is an output stream — the upstream node writes directly to the request socket on demand, so uploads aren't buffered into memory. Use string-to-stream to pipe in a literal string, or model-to-stream to serialise a model. Wire the headers input to send custom request headers (build them with make-http-headers and add-http-header).

When to use

Use HTTP request for any outbound HTTP call — REST APIs, webhooks, or file downloads. Wire credentials from OAuth2 client credentials for authenticated endpoints. For POST/PUT requests with a text body, convert the string with String to stream before wiring to body. Build custom request headers with Make HTTP headers and Add HTTP header and wire them into headers. The exec pin fires on any completed response (including 4xx/5xx); handle errors by checking the status code via a Break node on the exec branch, or by wiring the error pin for network-level failures.

Pins

Input pins

Pin Type Default Notes
URL string The full URL including scheme, host, path, and any query parameters.
Method HTTP method GET The HTTP verb (GET, POST, PUT, DELETE, PATCH, etc.).
Headers HTTP headers Optional request headers. Build with Make HTTP headers and Add HTTP header. Leave unwired to send no custom headers.
Body Output stream Optional request body as an output stream. Wire from `string-to-stream` for text payloads. Leave unwired for bodyless requests.
Credentials HTTP credentials Optional credentials. Wire from `oauth2-client-credentials` or another credentials node to attach an Authorization header.

Output pins

Pin Type Notes
Response HTTP response The raw HTTP response. Pass into a Break node to extract status code, headers, or body.

Execution pins

Pin Direction
In Input
Success Output
Error Output

Example

POST a JSON string to a webhook and log the response status. Build the payload using string nodes, then wire the Stream output of String to stream into the Body input of HTTP request (Method set to POST, URL set to the webhook address). On the Success execution output, break the Response output to inspect the status code (an HttpStatusCode enum like OK or NOT_FOUND) and log it via Enum to string and Log message. Wire the Error execution output to Fail to surface network-level failures.

See also