Skip to main content

HTTP Request

Type ID: core.http  ·  Kind: Action  ·  Ports: 1 in, 1 out

Makes an HTTP request to any URL using axios. Supports method selection, query parameters, headers, several body content types, basic/bearer authentication, and JSON or text response parsing.

Credentials​

None

Properties​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
MethodmethodoptionsYesGETGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONSAlways
URLurlstringYes''Full URL (e.g. https://api.example.com/endpoint)Always
AuthenticationauthenticationoptionsNononenone - None; bearerToken - Bearer Token; basicAuth - Basic AuthAlways
Bearer TokenbearerTokenstringNo''Bearer token stringauthentication = bearerToken
UsernameusernamestringNo''Basic-auth usernameauthentication = basicAuth
PasswordpasswordstringNo''Basic-auth passwordauthentication = basicAuth
Query ParametersqueryParametersobjectNo{}Key/value object appended to the URLAlways
HeadersheadersobjectNo{}Key/value object of HTTP headers (values coerced to string)Always
Body Content TypebodyContentTypeoptionsNojsonjson - JSON; form - Form Data; form-urlencoded - Form URL-Encoded; raw - RawAlways
BodybodystringNo''Request body for POST/PUT/PATCH. JSON object/string for JSON and form typesAlways
Response FormatresponseFormatoptionsNojsonjson - JSON; text - Text; autodetect - Auto DetectAlways
OptionsoptionsobjectNo{}Collection of request options (see below)Always

Options (nested fields)​

FieldKeyTypeDefaultDescription
Timeouttimeoutnumber30000Request timeout in milliseconds
Follow RedirectsfollowRedirectsbooleantrueWhether to follow HTTP redirects
Ignore SSL IssuesignoreSSLbooleanfalseWhether to ignore SSL certificate errors

Notes​

  • A missing url throws an error.
  • Body is only sent for POST/PUT/PATCH and only when non-empty; invalid JSON in a json or form/form-urlencoded body throws.
  • On success the output item is { statusCode, statusMessage, headers, body }. On failure the node throws HTTP Request failed (<status>): <message> rather than returning an error item.