http
Keyword
http(request: { method?, url: text, headers?, body? }): { status: number, headers, body } The http keyword is the egress runtime's outbound HTTP transport. It performs the actual HTTP call for an egress component — unlike the deprecated reactor web.http module, there is no allowedHosts gate, because the existence of the egress resource is the host allowlist.
It is only available inside egress components.
The request record:
| Field | Required | Description |
|---|---|---|
method | No | GET (default), HEAD, POST, PUT, DELETE, or PATCH. |
url | Yes | The absolute URL to call. |
headers | No | Map of header name to value. |
body | No | The request body. |
The result:
filtrera
{ status: number, headers: { text -> [text] }, body: value }http is total — it never throws. A failure that never reached a status line at all (DNS, TLS, a refused connection, a timeout) answers with status = 0 and the reason as the body, rather than claiming a server answered. Handle it like any other response:
filtrera
from
http { url = 'https://partner.example.test/session' method = 'POST' body = { id = id } }
match
{ status = 200, body = { token } } |> { session = token }
{ status = 0, body = reason } |> { error = { code = 'UNREACHABLE', message = reason } }
{ status = s } |> { error = { code = 'HTTP_' + s } }Availability
| Promotion | Rule | Reactor | Egress |
|---|---|---|---|
| ✓ |
Examples
Simple GET
filtrera
from http { url = 'https://partner.example.test/pricelists' }Authenticated POST
filtrera
from http {
url = 'https://partner.example.test/session'
method = 'POST'
headers = { 'Authorization' -> 'Bearer ' + token }
body = { configurationId = 'cfg_123' }
}Credentials are resolved inside the egress component (for example from the registry) so they never enter the calling reactor, rule, or job.