Skip to main content

Http Request

Sends an HTTP Request

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed even if the Catch node is used.

Input

  • Request - The HTTP Request body, can be a JSON, XML or Text.

Output

  • Response - HTTP Response
  • Headers - HTTP Response Headers
  • Cookies - HTTP Response Cookies
  • Status Code - HTTP Response Status Code

Options

  • URL - URL of the HTTP endpoint to call.
  • Method - HTTP method to use when making the request.
  • Authentication - Authentication type to use when making the request.
  • Credentials - Credentials to use when making the request.
  • Timeout - Time to wait for the request to complete, in seconds (default: 120).
  • Insecure Skip Verify - If set to true, the request will bypass SSL certificate verification. This is not recommended for production environments due to security concerns.
  • Encode as Base64 - If true, the request payload will be encoded as Base64. Useful when sending data that requires Base64 encoding.
  • Proxy Settings - Determines if a proxy should be used for the request and if so, how it should be configured.
  • Proxy Address - The address of the proxy server, if a proxy is to be used.
  • Proxy Credentials - Credentials used when the chosen proxy authentication method requires them.

How It Works

The HTTP Request node makes HTTP/HTTPS requests to external APIs and services:

  1. Request Preparation:

    • Retrieves URL, method, headers, cookies, and body from configuration and message
    • Merges custom headers/cookies with input headers/cookies
    • Encodes body as Base64 if option is enabled
    • Sets up authentication (Basic, Bearer, API Key) if configured
  2. Client Configuration:

    • Creates HTTP client with specified timeout (default: 120 seconds)
    • Configures proxy if enabled
    • Sets SSL verification based on Insecure Skip Verify option
    • Adds custom transport settings for connection handling
  3. Request Execution:

    • Sends HTTP request to the target URL
    • Handles streaming responses if enabled
    • Captures response body, headers, cookies, and status code
    • Manages redirects and connection pooling
  4. Response Processing:

    • Returns response body (automatically parses JSON if content-type is JSON)
    • Returns response headers as object
    • Returns cookies from Set-Cookie headers
    • Returns HTTP status code
    • Updates cookie store if configured

Requirements

  • URL: Valid HTTP/HTTPS URL
  • Method: GET, POST, PUT, DELETE, PATCH, or other HTTP method
  • Timeout: Optional, defaults to 120 seconds
  • Authentication: Optional credentials from vault if authentication is required

Error Handling

Error CodeDescriptionSolution
Core.Net.HttpRequest.ErrOnCreateConfiguration parsing failedCheck node configuration
Various runtime errorsNetwork errors, timeout, invalid URL, authentication failure, etc.Check URL, network connectivity, credentials, and timeout settings

Common runtime issues:

  • Connection timeout: Increase timeout value or check network
  • SSL certificate errors: Enable Insecure Skip Verify for self-signed certs (not recommended for production)
  • Authentication failures: Verify credentials are correct
  • 4xx/5xx status codes: Check API endpoint and request parameters

Usage Examples

Example 1: Simple GET Request

// Make a GET request to retrieve data
msg.url = "https://api.example.com/users";
// Method: GET (selected in options)
// After execution:
// msg.response contains the API response
// msg.statusCode contains 200

Example 2: POST Request with JSON Body

// Send JSON data to API
msg.url = "https://api.example.com/users";
msg.body = {
name: "John Doe",
email: "john@example.com"
};
msg.headers = {
"Content-Type": "application/json"
};
// Method: POST
// After execution: msg.response contains created user data

Example 3: Request with Authentication

// Make authenticated request
msg.url = "https://api.example.com/protected";
// Authentication: Bearer Token (selected in options)
// Credentials: Select from vault
// After execution: msg.response contains protected resource

Usage Notes

  • Default Timeout: 120 seconds if not specified
  • JSON Parsing: Response body is automatically parsed as JSON if content-type indicates JSON
  • Streaming: Enable streaming for large responses or server-sent events
  • Cookie Management: Use cookie store to maintain session across requests
  • Proxy Support: Supports HTTP/HTTPS proxies with optional authentication
  • SSL Verification: Disable only for testing with self-signed certificates
  • Base64 Encoding: Useful for binary data or specific API requirements

Tips

  • Store API credentials in vaults for security
  • Set appropriate timeouts based on expected response times
  • Use custom headers for API keys and authorization
  • Handle different status codes with conditional nodes
  • Enable debugging option to log request/response details
  • Use cookie store for maintaining sessions
  • Combine with loops for batch API operations
  • Implement retry logic for transient failures
  • Validate response status before processing body
  • Use streaming for large file downloads or real-time data
  • Download File - Specialized node for downloading files
  • HTTP In/Out - Create webhook endpoints
  • HTML Template - Generate request bodies
  • JSON - Parse and manipulate JSON responses
  • Vault - Store and retrieve API credentials