Utilities API ​
Centralized API documentation for all utility modules.
Module Index ​
| Module | Location | Description |
|---|---|---|
| IO | src/common/io.zig | IO context helpers |
| Compression | src/compression/ | gzip/deflate/brotli/zstd compress/decompress |
| Cache | — | ETag/conditional static serving, download resume |
| Metrics | src/web/metrics/ | Thread-safe request/response metrics |
| Session | — | Cookie-backed sessions (no built-in store) |
| SSE | src/web/sse/ | Server-Sent Events parsing and streaming |
Quick Reference ​
Encoding ​
httpx.quic.varint.encode(buf, value)/httpx.quic.varint.decode(data, offset)— QUIC variable-length integer encoding
WebSocket ​
See Protocol API for the full WebSocket section:
httpx.websocket.Handshake.computeAccept(key, out)—Sec-WebSocket-Accepthttpx.websocket.Handshake.buildUpgradeRequest(...)— client upgrade headhttpx.websocket.Frame.buildFrameHeader / parseFrameHeader / applyMask / generateKeyhttpx.websocket.Frame.Opcode— frame opcode enum
MIME and URIs ​
httpx.mime.fromPath(path)— extension-based MIME lookuphttpx.Uri.parse(...)— RFC 3986 URI parsinghttpx.fs.readFileLimited(allocator, path, maxBytes)— bounded file reads
