HTTP Request Node Settings

The HTTP Request Node settings panel allows you to configure and execute HTTP requests to external services or APIs.

This is a versatile node for fetching data, sending data, or interacting with any HTTP-based endpoint.

Main Configuration

  • Node Label: A descriptive name for this HTTP request node.

    • Example: "Fetch User Data", "Submit Form to API".
    • Default: HTTP Request.
  • HTTP Method: The HTTP method to use for the request.

    • Options: GET, POST, PUT, DELETE, PATCH.
    • Default: GET.
  • URL: The target URL for the HTTP request.

    • Example: https://api.example.com/users.
    • Note: If no protocol (http/https) is specified, https:// will be prepended automatically, unless the URL starts with a / (for relative paths, if applicable in your setup).

Request Configuration Tabs

The panel uses tabs to organize different parts of the HTTP request configuration:

1. Params Tab

  • Description: Define URL query parameters for the request. These are appended to the URL (e.g., ?key1=value1&key2=value2).
  • Interface: A key-value editor where each entry represents a query parameter.
  • Fields per entry: Key (parameter name), Value (parameter value).

2. Auth Tab

  • Description: Configure authentication for the request.
  • Options:

    • None: No authentication.
    • Basic Auth: Requires Username and Password.
    • Bearer Token: Requires a Token.
    • API Key: Requires Key, Value, and where to Add to (Headers or Query Params).
  • Default: None.

3. Headers Tab

  • Description: Define HTTP headers for the request.
  • Interface: A key-value editor.
  • Fields per entry: Key (header name, e.g., Content-Type), Value (header value, e.g., application/json).

4. Body Tab

  • Description: Define the request body, typically used with methods like POST, PUT, PATCH.
  • Body Type Options:

    • None: No request body.
    • JSON: Enter a valid JSON object in the text area.
    • Text: Enter plain text in the text area.
  • Default Body Type: none.
  • Content Area: A text area is provided for entering JSON or Text content when the respective body type is selected.

5. Pre-request Script Tab

  • Description: Write JavaScript code that executes before the HTTP request is sent.
  • Usage: Useful for preparing data, setting dynamic headers or variables, or other pre-flight operations.
  • Interface: A text area for script input.
  • Scripting Environment

    The specifics of the scripting environment (available variables, libraries like pm object if Postman-like) should be detailed based on your application's capabilities.

6. Tests Tab

  • Description: Write JavaScript code that executes after the HTTP request is completed and the response is received.
  • Usage: Useful for validating response data, checking status codes, setting variables based on the response, or chaining requests.
  • Interface: A text area for script input.
  • Scripting Environment

    Similar to Pre-request Scripts, detail the available testing framework, variables (e.g., responseBody, responseCode), and assertion methods.

Usage Example

Fetching user data from a public API:

  1. Node Label: Get User Details
  2. HTTP Method: GET
  3. URL: https://jsonplaceholder.typicode.com/users/1
  4. Params Tab: (empty for this example, or add id: 1 if URL was https://jsonplaceholder.typicode.com/users)
  5. Auth Tab: None (as it's a public API)
  6. Headers Tab: (empty, or add Accept: application/json if needed)
  7. Body Tab: None (for GET request)
Output Data

The output of this node will typically be the response from the HTTP request, including status code, headers, and body. This data can then be used by subsequent nodes in the workflow.

Loading search features...