HTTP Client
Make HTTP requests with a simple HTTP client
The HTTPClient capability provides WASM function developers to perform HTTP client requests to remote or local HTTP servers. While a simplistic client, Tarmac supports multiple HTTP requests, setting headers, and custom payloads.
Call
The Call function provides users with the ability to make HTTP client requests to the specified URL. The body
key within the request and response JSON will be base64 encoded to avoid conflicts.
Interface Details
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
|
|
|
|
|
Example JSON
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
HTTPClient
HTTPClientResponse
The Status structure within the response JSON denotes the success of the database call. The status code value follows the HTTP status code standards, with anything higher than 399 is an error.
Note: Tarmac will provide a 200 status code if the HTTP request was successfully made, check the code
value to validate the HTTP server return code.
Last updated