Skip to main content
HTTP commands enable you to make HTTP/HTTPS requests to APIs and web services. These commands are essential for fetching data from REST APIs, web services, and other HTTP-based endpoints.

Overview

HTTP commands provide functionality for:
  • Making GET, POST, PUT, DELETE, and other HTTP method requests
  • Configuring request headers, query parameters, and request bodies
  • Handling authentication and authorization
  • Managing timeouts and error handling
  • Processing HTTP responses

Available Commands

Common Use Cases

  • API Integration: Fetch data from REST APIs
  • Web Scraping: Retrieve HTML content from web pages
  • Data Synchronization: Pull data from external services
  • Authentication: Handle API authentication flows
  • Webhook Processing: Send data to webhook endpoints

Command Parameters

HTTP commands typically support the following parameters:
ParameterTypeDescriptionRequired
urlstringThe target URL for the HTTP requestYes
methodstringHTTP method (GET, POST, PUT, DELETE, etc.)No (defaults to GET)
headersobjectHTTP headers to include in the requestNo
bodystring/objectRequest body for POST/PUT requestsNo
timeoutnumberMaximum wait time in millisecondsNo
queryParamsobjectURL query parametersNo

Variable Support

HTTP commands support variable interpolation in URLs, headers, and request bodies:
{
  "command": "http-request",
  "params": {
    "url": "https://api.example.com/data?project=@{PROJECT_ID}",
    "headers": {
      "Authorization": "Bearer %{API_KEY}"
    },
    "timeout": 10000
  }
}

Best Practices

  • Use Secrets for Credentials: Always use %{SECRET_NAME} for API keys and passwords
  • Set Appropriate Timeouts: Configure timeouts based on expected response times
  • Handle Errors: Implement error handling for failed requests
  • Use Project Variables: Leverage @{PROJECT_ID} and @{RUN_ID} for tracking
  • Validate Responses: Always validate response structure before processing