Skip to main content

Module http_client

Module http_client 

Source

Structs§

HttpClient
A typed /agdx/* client over an injected Transport.
HttpRequest
A request the Transport performs. path is already the full path plus query string (e.g. /agdx/kv/sessions/dXNlcjox?expires_at_micros=10). The transport prepends its own base URL. A JSON body is present only on POST/PUT, and when present the transport sends Content-Type: application/json.
HttpResponse
What the Transport returns: the numeric status, the response headers (for the routes that carry metadata out of band, like the KV get expiry), and the raw body. A transport that does not surface headers leaves headers empty, in which case header-carried metadata reads as absent.
KvValue
The result of a single-key KV read: the raw value bytes plus the optional absolute expiry (epoch microseconds). A kv_get builds it from the raw response body and the KV_EXPIRES_AT_MICROS_HEADER header. A scan page carries the base64url KvEntryView shape instead, since a JSON array cannot hold raw bytes.

Enums§

ClientError
Why a typed call failed.
Method
The HTTP verb a Transport must perform.

Traits§

Transport
The IO seam. A wasm consumer implements it over gloo-net, a native one over reqwest. The client never constructs URLs beyond the path: the transport owns the base URL, credentials, and headers.

Functions§

base64url_decode
Decode URL-safe unpadded base64. None on any non-alphabet byte or an impossible length (a single trailing char carries no whole byte).
base64url_encode
Encode bytes as URL-safe unpadded base64 (RFC 4648 §5, no =).