Repository navigation
Keyword http
Oliver Atkinson edited this page May 10, 2026
·
1 revision
Performs an HTTP request and returns a JSON response object.
http is in the default computer. It is an async returns keyword, so runtime streams can update when the request result changes.
{
"{returns}": {
"http": {
"request": {
"url": "https://example.com/api",
"method": "GET",
"headers": {
"Accept": "application/json"
},
"body": null,
"timeout": 30
}
}
}
}method, headers, body, and timeout are optional.
The result includes:
{
"body": {},
"headers": {},
"status": 200,
"url": "https://example.com/api"
}body is decoded as JSON when possible. Non-JSON text responses return a string body.
{
"{returns}": {
"http": {
"request": {
"url": { "{returns}": { "from": { "reference": "api.users.url" } } },
"headers": {
"Authorization": { "{returns}": { "item": ["token"] } }
}
}
}
}
}