utils:http_request
utils:http_request
Do an HTTP GET/POST request to the specified URL
url: REQUIRED, URL to use
method: OPTIONAL, HTTP method to use. Valid values: GET, POST
headers: OPTIONAL, HTTP headers to send
body: OPTIONAL, base64-encoded body to POST when using HTTP POST. Ignored if HTTP GET is used.
params: OPTIONAL, URI params
ignore_errors: OPTIONAL, ignore errors during the HTTP call. Default: false
save_as: OPTIONAL, saves the response body to a local file. Default: None
Example:
{
"tool": "utils:http_request",
"parameters": {
"url": "https://www.google.com",
"method": "POST",
"headers": {"Authorization": "my-auth-token"},
"body": "aGVsbG8sIHdvcmxkIQ==",
"params": {"id": "1"},
"ignore_errors": true,
"save_as": "response.json"
}
},
Parameter | Properties | Default | Type | Choice | Description |
url | required | | | | |
method | optional | POST | str | 'GET', 'POST' | |
body | optional | | str | | |
headers | optional | | | | |
params | optional | | | | |
ignore_errors | optional | false | bool | | |
save_as | optional | | | | |