Expand description
SpacetimeType-ified HTTP request and response types,
for use in the procedure HTTP API.
The types here are all mirrors of various types within the http crate.
That crate’s types don’t have stable representations or public interiors,
so we’re forced to define our own representation for the SATS serialization.
These types are that representation.
Users aren’t intended to interact with these types,
Our user-facing APIs should use the http crate’s types directly, and convert to and from these types internally.
These types are used in BSATN encoding for interchange between the SpacetimeDB host
and guest WASM modules in the procedure_http_request ABI call.
For that reason, the layout of these types must not change.
Because we want, to the extent possible,
to support both (old host, new guest) and (new host, old guest) pairings,
we can’t meaningfully make these types extensible, even with tricks like version enum wrappers.
Instead, if/when we want to add new functionality which requires sending additional information,
we’ll define a new versioned ABI call which uses new types for interchange.
Structs§
- Headers
- A set of HTTP headers.
- Request
- Represents an HTTP request which can be made from a procedure running in a SpacetimeDB database.
- Response
Enums§
Constants§
- ACCEPTABLE_
ROUTE_ PATH_ CHARS_ HUMAN_ DESCRIPTION - A human-readable description of the characters accepted by
character_is_acceptable_for_route_path, for use in error reporting.
Functions§
- character_
is_ acceptable_ for_ route_ path - True if
cis a valid character to appear in the path of a user-defined HTTP route.