QANode Logo

HTTP Request Node

The HTTP Request node allows you to make HTTP requests to REST APIs, SOAP services, or any web endpoint. It supports all common HTTP methods, multiple authentication types, and integration with saved credentials.


Overview

PropertyValue
Typehttp-request
CategoryAPI
ColorPurple (#a855f7)
Inputin
Outputout

Configuration

Builder Mode

Builder mode provides a visual interface for constructing the request:

FieldTypeDescription
MethodstringGET, POST, PUT, PATCH, DELETE
URLstringEndpoint URL (supports {{ }})
HeadersobjectHTTP headers (key-value pairs)
BodyanyRequest body (JSON or plain text)
CredentialstringSaved credential for authentication

Raw Mode

Raw mode allows you to edit the request as pure JSON, providing full control.


Authentication

The node supports multiple authentication methods:

Using Saved Credentials

The most secure and recommended approach. Select a credential of type HTTP/API that contains the base URL and token:

  1. In the Credential field, select the desired credential
  2. The base URL and authentication headers will be applied automatically
  3. In the URL field, provide only the path: /api/users

Manual Authentication

TypeFieldsResult
Bearer TokenTokenHeader Authorization: Bearer {token}
Basic AuthUsername + PasswordHeader Authorization: Basic {base64}
API KeyHeader Name + TokenCustom header with the token

HTTP Methods

MethodTypical Use
GETFetch data (list, get details)
POSTCreate resources, submit data
PUTReplace a resource entirely
PATCHPartially update a resource
DELETERemove a resource

Headers

Add custom headers as key-value pairs:

HeaderExample
Content-Typeapplication/json
Acceptapplication/json
X-Custom-Headermy-value
AuthorizationBearer {{ variables.TOKEN }}

Headers support {{ }} expressions for dynamic values.


Body (Request Body)

For methods that accept a body (POST, PUT, PATCH), you can send:

JSON

{
  "name": "{{ variables.USER_NAME }}",
  "email": "{{ steps["web-flow"].outputs.extracts.email }}",
  "active": true
}

Form Data

{
  "username": "admin",
  "password": "{{ variables.ADMIN_PASS }}"
}

The body supports {{ }} expressions in any value.


Outputs

OutputTypeDescription
statusnumberHTTP status code (200, 404, 500, etc.)
bodystringResponse body as plain text
jsonanyResponse body parsed as JSON

Accessing Outputs

// Response status
{{ steps["http-request"].outputs.status }}  →  200

// JSON body
{{ steps["http-request"].outputs.json }}  →  { "id": 1, "name": "João" }

// Specific JSON property
{{ steps["http-request"].outputs.json.name }}  →  "João"

// Array in JSON
{{ steps["http-request"].outputs.json.items[0].title }}  →  "Primeiro Item"

// Body as plain text
{{ steps["http-request"].outputs.body }}  →  '{"id": 1, "name": "João"}'

Practical Examples

GET — Fetch a user

Method: GET
URL: https://api.exemplo.com/users/1
Headers: { "Accept": "application/json" }

POST — Create a resource

Method: POST
URL: https://api.exemplo.com/users
Headers: { "Content-Type": "application/json" }
Body: {
  "name": "Maria",
  "email": "maria@exemplo.com"
}

PUT with Bearer authentication

Method: PUT
URL: https://api.exemplo.com/users/1
Auth: Bearer Token → {{ steps.login.outputs.json.token }}
Body: {
  "name": "Maria Silva",
  "role": "admin"
}

Chaining requests

[HTTP Request: POST /login]
    │ outputs.json.token = "abc123"
    ▼
[HTTP Request: GET /api/profile]
    │ Header: Authorization = Bearer {{ steps.login.outputs.json.token }}
    ▼
[If: {{ steps.profile.outputs.status }} === 200]
    │ true → [Log: "Perfil: {{ steps.profile.outputs.json.name }}"]

Error Handling

StatusMeaningSuggested Action
200-299SuccessContinue normally
400Bad requestCheck body/params
401UnauthorizedCheck token/credential
403ForbiddenCheck permissions
404Not foundCheck URL
500Server errorCheck API

Use the If node after HTTP Request to handle different status codes:

[HTTP Request] → [If: status === 200]
                    │ true → [Continue...]
                    │ false → [Log: "Error: {{ steps.api.outputs.status }}"]

Tips

  • Use saved credentials instead of placing tokens directly in fields — it is more secure and easier to maintain
  • Check the status before using the JSON — an error response may not have the expected format
  • Use variables for base URLs: {{ variables.API_URL }}/endpoint makes it easy to switch environments
  • The json output returns null if the response is not valid JSON — in that case, use body