api.httpCall() for an outbound request that belongs to the current Component execution. It supports ordinary JSON and text responses, binary payloads, multipart forms, live byte or SSE iterators, and direct transfers between HTTP and Storage.
Inbound HTTP is a different boundary. Publish an Endpoint when another system must call RevoEngine; use a durable outbound Webhook when RevoEngine should deliver a retried notification without holding the current execution open.
Choose the right HTTP boundary
api.httpCall() is outbound and synchronous with the current execution. It does not publish an inbound route, create a durable retry queue, or prove that a successful remote response completed the provider’s business operation.
Request and response formats
Request and response formats are independent:
JSON is the default. Set formats explicitly when they are part of the integration contract.
requestType: 'json' is valid for every supported method, including bodyless requests; non-JSON request types require a method that accepts a body.
Query and multipart values
Query parameter values inparams and text fields in formData accept strings, numbers, and booleans. The HTTP runtime converts numbers and booleans to text before request validation and sending: true becomes 'true', false becomes 'false', and 0 becomes '0'. This conversion preserves the original request object.
For example, { key: 'skip', value: 1 } and { key: 'active', value: true } are valid query parameters. Query values must be nonempty; multipart text fields may contain an empty string. The legacy plain query-map type retains its historical '[object Object]' wire conversion; serialize structured queries explicitly with JSON.stringify. Arrays and nested query maps are unsupported, and multipart text values cannot be objects.
Payload ownership and diagnostics
Request and response bodies are integration-owned content. Explicit Vault reads produce ordinary values in the caller. HTTP preserves JSON, text and binary body content.response.data retains the provider body, including any credential echo. Decide what to return, persist or log in your own code. Provider headers can also echo credentials; choose safe response fields.
Vault reads omit credential values from automatic previews. Ordinary HTTP calls use bounded previews; keep credential-bearing payloads out of execution captures. Transport failures retain safe error codes, HTTP status and retry metadata without exposing Axios request objects or credential-bearing URLs.
HTTP data, multipart text and webhook JSON bodies do not consume the DTO control-field byte budget. Runtime tests cover 60 MiB payloads; component memory, deadlines, proxy and provider limits still govern actual delivery. For queued webhooks, saveDetails and maskDetails control a separate history snapshot. For explicitly read credentials, configure maskDetails for credential-bearing request sections before saving webhook history. History masking does not change delivery content.
Call a JSON API
Keep credentials in Vault and send query parameters throughparams. Read the value explicitly with await vault.get or await vault.getAccessToken, then build the outgoing header. Protect execution capture and never log credentials. Provider bodies can echo credentials; return only the fields your caller needs.
vault.get defaults to instance scope. Personal reads in saved Components require the exact grant and a verified executing owner; direct owner reads use the current account. Integration consumption follows the same saved Component or Tool grant mapping:
Make external mutations retry-safe
A timeout is ambiguous: the provider may have committed the operation before the connection failed. Generate or load a stable business idempotency key before the first attempt and reuse it for every retry.Submit multipart form data
PutformData on the first request argument. For one Storage-backed binary part, leave that part’s value empty and provide source in options.
Content-Type header without the matching generated boundary.
Consume a byte stream
Live response iterators are available inside the local low-code V8 runtime. The initialawait resolves after response headers; each iterator step then waits for data, EOF, or an error with backpressure.
Consume Server-Sent Events
SetstreamFormat: 'sse' for an upstream text/event-stream response.
{ event, data, id? }. data remains a string; JSON and provider markers such as [DONE] are application data and must be interpreted explicitly. Reconnect and Last-Event-ID replay are not automatic. Incomplete frames at EOF are discarded.
Stream HTTP responses into Storage
UseresponseType: 'storage' with a flat target to keep a large response without buffering it in the Component.
2xx bodies are stored. The runtime creates a direct upload session, streams the response, and finalizes it before returning response.storage.entry; response.data is then undefined. Failed writes abort the new session, while a failed replacement keeps the existing entry.
The inverse direction uses requestType: 'storage' and source:
source and target can be combined for an external conversion API. A target may also fill and finalize an existing active, empty, direct upload session. For caller-controlled parts, incremental generation, repair, schema policy, or resumable upload behavior, use Storage upload sessions instead.
Receive callbacks and events
api.httpCall() does not receive traffic. Configure an authenticated Endpoint with a request guard, then read the validated request context from api.input() inside its Component.
body, query, headers, and parameters; operator-owned template values remain separate. Treat every caller field as untrusted, do not forward inbound headers wholesale, and deduplicate external event IDs before performing a business mutation. If the sender signs raw bytes, do not reconstruct the signature input from parsed JSON unless its protocol defines canonical JSON.
Use an Event after acceptance when several Jobs or Agents should react independently. Use a Job directly when exactly one durable workflow owns the callback.
Runtime constraints
api.httpCall()sends real external requests in either execution mode.readOnly: truerejects a Storage response target and protected Platform API writes before transport; it does not simulate third-party side effects.- One deadline covers request preparation, response headers, and the body. Receiving data does not reset it.
- A Component cancellation or timeout does not recall a request already accepted by the remote service.
- Proxy mode supports JSON/text requests, text/binary responses and both Storage transfer directions. Use
requestType: 'storage'withsourceto send a file, andresponseType: 'storage'withtargetto save a response. They may be combined for conversion. - With
proxy: true, Go calls the provider through the dedicated egress network used for IP allowlisting. It streams the Storage source and sends the response directly to the authorized Storage upload URL. File bytes stay in Go; runtime prepares or claims the target session, verifies the upload receipt against Storage metadata, then finalizes. - Only complete 2xx responses are saved. Other statuses abort the unused target session and return bounded diagnostic text. Interrupted source reads and uploads fail without replaying the provider request. A lost upload acknowledgement may be reconciled from a complete receipt, without repeating the provider call.
- Proxy mode does not expose live byte/SSE iterators, multipart uploads, document responses or current-caller credentials.
- Explicit text responses retain the provider’s text even when its content type is JSON. Buffer/base64 responses preserve binary data.
Set-Cookieretains every value as an array. - Destination parameters and credentials stay within the destination request. HTTP errors return a status to inspect; proxy transport and incomplete-response failures throw.
- Do not log signed URLs, authorization headers, Secret values, unrestricted request bodies, or provider error payloads.
api.httpCall() reference, Endpoints, Outbound webhooks, Events, and Storage.
