Action that makes HTTP requests with full control over headers, authentication, and request options

Example

// Simple GET request
await runAction({
ActionName: 'HTTP Request',
Params: [{
Name: 'URL',
Value: 'https://api.example.com/data'
}]
});

// POST request with JSON body
await runAction({
ActionName: 'HTTP Request',
Params: [{
Name: 'URL',
Value: 'https://api.example.com/users'
}, {
Name: 'Method',
Value: 'POST'
}, {
Name: 'Body',
Value: { name: 'John Doe', email: 'john@example.com' }
}, {
Name: 'Headers',
Value: { 'Content-Type': 'application/json' }
}]
});

// Request with authentication
await runAction({
ActionName: 'HTTP Request',
Params: [{
Name: 'URL',
Value: 'https://api.example.com/protected'
}, {
Name: 'Authentication',
Value: {
type: 'bearer',
token: 'your-api-token'
}
}]
});

Hierarchy (view full)

Constructors

Methods

  • Makes an HTTP request with configurable options

    Parameters

    • params: RunActionParams<any>

      The action parameters containing:

      • URL: Target URL (required)
      • Method: HTTP method (GET, POST, PUT, DELETE, etc.) - default: GET
      • Headers: Object with request headers
      • Body: Request body (string or object)
      • BodyType: "json" | "form" | "text" | "binary" - default: "json"
      • Authentication: Auth config object { type: 'basic'|'bearer', username?, password?, token? }
      • Timeout: Request timeout in milliseconds - default: 30000
      • FollowRedirects: Boolean - default: true
      • MaxRedirects: Number - default: 5
      • ValidateStatus: Function string to validate response status
      • ResponseType: "json" | "text" | "arraybuffer" | "stream" - default: "json"

    Returns Promise<ActionResultSimple>

    Response object with status, headers, and body

  • Executes the action with the provided parameters.

    Parameters

    • params: RunActionParams<any>

      The action execution parameters including context

    Returns Promise<ActionResultSimple>

    Promise resolving to the action result

  • Configure authentication for the request

    Parameters

    • config: AxiosRequestConfig<any>
    • auth: any

    Returns {
        error?: string;
        success: boolean;
    }

    • Optional error?: string
    • success: boolean
  • Configure request body based on type

    Parameters

    • config: AxiosRequestConfig<any>
    • body: any
    • bodyType: string

    Returns {
        error?: string;
        success: boolean;
    }

    • Optional error?: string
    • success: boolean