Skip to content

httpGet

Back to Index
httpGet(uri: string): {
headers: { text -> text } | nothing
}

httpGet effects allows a Reactor to make external HTTP GET requests.

Return Type

The effect will return the result from the request:

:{
statusCode: number
contentType: text
content: text
}

Security

All external requests must be done using HTTPS. It’s possible to restrict which hostnames are allowed on a system level by setting the reactors/effects/httpRequest/allowedHosts

Examples

POST request

from {
method = args => httpGet('https://example.com') with {
headers = {
'Authorization' -> 'Bearer <token>'
}
}
}
Back to Index