Skip to content

HTTP PUT

Type: http-put  ·  Package: HTTP Activities v1.0.0  ·  Output: ZoanHttpResponse

Sends a PUT request, typically to completely replace an existing resource. You send the whole object with its new values; the API replaces the resource with what you send.

Same as POST but with the PUT method: send the body to the url of a specific resource (which usually includes its id). Returns a ZoanHttpResponse. Fails if the server responds with an error — see error handling.

ParameterEditorDescription
urlexpressionThe URL of the resource to be replaced (usually includes its id).
bodyexpressionThe complete resource with its new values (object → JSON, or text).
ParameterEditorDescription
contentTypetextContent type. Por defecto application/json.
headersJSONDictionary of extra headers (name → value). See headers.
authorizationJSONAuthentication: bearer, basic or apikey. See authentication.

Returns a ZoanHttpResponse.

HTTP PUT
url = = "https://api.erp.com/clientes/" + clienteId
body = { "nombre": = nuevoNombre, "nit": = nit, "activo": false }
authorization = { "type": "bearer", "token": = credential("api-erp").ToPlainText() }
→ output: resp