Advanced HTTP Request icon

Advanced HTTP Request

Makes HTTP requests with advanced type conversion and validation

Overview

This node performs advanced HTTP requests with flexible configuration options and enhanced type conversion for request data. It supports all common HTTP methods (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) and allows users to specify URLs, headers, and body content dynamically or statically. The node is useful when you need to interact with any RESTful API or web service that requires custom headers, dynamic payloads, or specific HTTP behaviors such as redirect handling and SSL validation.

Practical examples include:

  • Calling a third-party API with custom authentication headers.
  • Sending JSON payloads with precise type conversions.
  • Handling APIs that require following redirects or have strict SSL requirements.
  • Dynamically building requests based on incoming data from previous workflow nodes.

Properties

Name Meaning
Method The HTTP method to use for the request. Options: DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT
URL The full URL to which the HTTP request will be sent.
Use Dynamic Data Whether to construct the request parameters (method, URL, headers, body) dynamically from incoming JSON.
Headers Custom HTTP headers to send with the request (only used if not using dynamic data).
Body JSON body content to send with POST, PUT, or PATCH requests (only used if not using dynamic data).
Options Additional request options including:
- Follow Redirects Whether to automatically follow HTTP redirects (default: true).
- Max Redirects Maximum number of redirects to follow (default: 5).
- Return Full Response Whether to return the full HTTP response including status code and headers instead of just the body.
- Timeout Request timeout in milliseconds (default: 30000 ms).
- Validate SSL Certificate Whether to validate SSL certificates (default: true).

Output

The node outputs an array of items corresponding to each input item processed. Each output item contains a json field structured as follows:

  • If Return Full Response option is disabled (default):

    {
      "data": <response_body>
    }
    

    Where <response_body> is the parsed response body from the HTTP request.

  • If Return Full Response option is enabled:

    {
      "statusCode": <HTTP_status_code>,
      "headers": { <response_headers> },
      "body": <response_body>,
      "url": <request_url>,
      "method": <request_method>
    }
    

    The headers are sanitized to redact sensitive tokens or cookies by truncating or replacing their values.

The node does not output binary data.

Dependencies

  • Requires internet access to make HTTP requests.
  • Supports optional credentials for HTTP Basic Auth or Header-based Auth (configured separately in n8n).
  • No external libraries beyond standard Node.js HTTP utilities and n8n workflow helpers.

Troubleshooting

  • Invalid URL error: The node validates URLs strictly. Ensure the URL starts with http:// or https:// and is well-formed.
  • Timeouts: Requests may fail if the target server is slow or unresponsive. Adjust the timeout option accordingly.
  • SSL Validation Errors: If connecting to servers with self-signed or invalid certificates, disable SSL validation via the option.
  • Type Conversion Errors: When using dynamic data, malformed or incorrectly typed fields in the input JSON can cause conversion errors. Check the input structure carefully.
  • Authentication Failures: Make sure required API keys or credentials are correctly configured in n8n and included in headers if needed.
  • Redirect Loops: If the maximum redirects limit is reached, consider increasing it or disabling redirects if not needed.

Links and References

Discussion