Skip to content

Utilities API ​

Centralized API documentation for all utility modules.

Module Index ​

ModuleLocationDescription
IOsrc/common/io.zigIO context helpers
Compressionsrc/compression/gzip/deflate/brotli/zstd compress/decompress
Cache—ETag/conditional static serving, download resume
Metricssrc/web/metrics/Thread-safe request/response metrics
Session—Cookie-backed sessions (no built-in store)
SSEsrc/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-Accept
  • httpx.websocket.Handshake.buildUpgradeRequest(...) — client upgrade head
  • httpx.websocket.Frame.buildFrameHeader / parseFrameHeader / applyMask / generateKey
  • httpx.websocket.Frame.Opcode — frame opcode enum

MIME and URIs ​

  • httpx.mime.fromPath(path) — extension-based MIME lookup
  • httpx.Uri.parse(...) — RFC 3986 URI parsing
  • httpx.fs.readFileLimited(allocator, path, maxBytes) — bounded file reads

Released under the MIT License.