Expand description
Minimal async HTTP/1.1 client and one-shot server transport for the Moirai runtime.
Runs over Moirai async sockets and moirai_tls without Tokio. The client
provides Content-Length and chunked response framing, a bounded keep-alive
pool with idle eviction, RFC 9110 redirects, and one deadline across each
logical request. Its optional server boundary uses bounded request bodies,
typed one-shot connection typestates, and the same Moirai socket/deadline
primitives. HTTP/2 and vendor protocols remain outside this crate.
Re-exports§
pub use codec::Response;pub use conn::Origin;pub use request::HttpRequestHead;pub use server::AwaitingRequest;pub use server::AwaitingResponse;pub use server::HttpConnection;pub use server::HttpRequest;pub use server::HttpResponse;pub use server::HttpServer;pub use server::ServerConfig;pub use upgrade::WebSocketConfig;pub use upgrade::WebSocketUpgrade;pub use upgrade::accept_websocket;pub use upgrade::accept_websocket_with_validator;pub use websocket::WebSocketStream;
Modules§
- codec
- HTTP/1.1 request serialization and response parsing (status line, headers, and body framing: Content-Length, chunked transfer-encoding, or EOF-delimited).
- conn
- Transport connection: a plain or TLS-wrapped Moirai TCP stream, unified as a
single Moirai async stream via a static enum (no
dynon the hot path). - request
- Bounded HTTP/1.1 request-head parsing for server protocols.
- server
- Bounded one-shot HTTP/1.1 server transport over Moirai TCP sockets.
- upgrade
- HTTP/1.1 WebSocket upgrade validation and response serialization.
- websocket
- Bounded RFC 6455 message framing over a Moirai async byte stream.
Structs§
- Http
Client - Async HTTP/1.1 client with bounded redirects and connection reuse.