Skip to content

httpPut

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

httpPut effects allows a Reactor to make external HTTP PATCH 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 => httpPut('https://example.com') with {
headers = {
'Authorization' -> 'Bearer <token>'
}
body = {
field = 'value'
} asJson
}
}
Back to Index