HTTP Request Node
Performs an outbound HTTP call and branches on success/error.
Config vs inputs (code-grounded)
config: transport/runtime settings (timeout_ms,retry_config, optionalcredentials_id)inputs: request payload (url,method,query_params,headers,body)urlis required ininputs
Request body (inputs.body)
body.type | Behavior |
|---|---|
json | JSON body; Content-Type: application/json |
form_data | application/x-www-form-urlencoded from content key/value map |
multipart | multipart/form-data with auto-generated boundary (do not set Content-Type in headers) |
raw | Raw string; optional content_type |
file | Single binary body from base64 content.file and content.content_type |
Multipart (body.type: multipart)
body.content is an array of parts (or { "parts": [ ... ] } — same shape the engine accepts). Each part is an object:
- Text field:
name,part_type:"text",value(string; expressions allowed at runtime like other inputs). - File field:
name,part_type:"file",file(standard base64, no data-URL prefix), optionalfilename, optionalcontent_type.
File payloads are buffered in memory (same model as the existing single-file body mode). Very large uploads should use presigned object storage or another integration path.
Outputs/branches
- Uses
matched_output. successwhen request completes as expected.errorfor request failures, timeout, or transport errors.
Example usage snippet
{
"id": "n_http",
"type": "http_request_node",
"config": {
"timeout_ms": 3000,
"retry_config": { "max_attempts": 2, "backoff_ms": 250 }
},
"inputs": {
"url": "https://api.partner.com/orders",
"method": "POST",
"headers": { "Content-Type": ["application/json"] },
"body": { "type": "json", "content": { "orderId": "o-123" } }
}
}
Multipart example (file part uses raw base64 in file; omit Content-Type in headers):
{
"inputs": {
"url": "https://api.partner.com/upload",
"method": "POST",
"body": {
"type": "multipart",
"content": [
{ "name": "title", "part_type": "text", "value": "Quarterly report" },
{
"name": "document",
"part_type": "file",
"file": "<base64-encoded-bytes>",
"filename": "report.pdf",
"content_type": "application/pdf"
}
]
}
}
}
Common pitfalls
- Missing timeout and causing long-running executions.
- Not masking sensitive headers in logs.
- Treating all non-2xx responses the same without branch-specific handling.
- Setting
Content-Typemanually formultipart— the engine must set the boundary; duplicate or wrongContent-Typebreaks the request. - Confusing Form (URL-encoded) (
form_data) with multipart — onlymultipartsendsmultipart/form-datawith separate parts and file fields.