API Overview ​
This page maps the explicit public API surface exposed by httpx.zig.
Root Module (httpx) ​
The root module re-exports core types and convenience helpers so most apps can import only httpx.
Client Helpers ​
httpx.fetch(url)httpx.send(method, url, options)httpx.get/post/put/delete/del/patch/head/trace/connect/options/opts(...)- Explicit allocator overrides:
httpx.fetchWithAllocator(...),httpx.sendWithAllocator(...), and*WithAllocatorvariants for each alias.
Optional Client Builder Helpers ​
httpx.ClientConfig.defaults().withDefaultHeaders(...)httpx.ClientConfig.defaults().withFollowRedirects(...)httpx.ClientConfig.defaults().withHttp2Settings(...)httpx.ClientConfig.defaults().withHttp3Settings(...)httpx.ClientConfig.defaults().withSslVerification(...)httpx.ClientConfig.defaults().withKeepAlive(...)httpx.ClientConfig.defaults().withMaxResponseSize(...)httpx.RequestOptions.defaults().withQueryParams(...)httpx.RequestOptions.defaults().withFormUrlEncoded(...)httpx.RequestOptions.defaults().withBearerToken(...)httpx.RequestOptions.defaults().withBasicAuth(...)httpx.RequestOptions.defaults().withVersion(...)httpx.RequestOptions.defaults().withHttp2()httpx.RequestOptions.defaults().withHttp3()httpx.BasicAuthhttpx.Proxyhttpx.ProxyKind
Server Types ​
httpx.Serverhttpx.ServerConfighttpx.PortConflictStrategyhttpx.FileResponseOptions
Concurrency Helpers ​
httpx.all(...)httpx.any(...)httpx.race(...)httpx.allSettled(...)httpx.first(...)(alias forany)httpx.fastest(...)(alias forrace)httpx.settled(...)(alias forallSettled)httpx.successfulCount(...)httpx.errorCount(...)httpx.BatchBuilder
Network Helpers ​
httpx.netInit()/httpx.netDeinit()httpx.resolveAddress(host, port)httpx.resolveAllAddresses(allocator, host, port)httpx.parseHostAndPort(input, default_port)httpx.parseAndResolveAddress(input, default_port)httpx.isIpAddress/isIp4Address/isIp6Address(...)
Utility Aliases ​
httpx.queryValue(...)httpx.parseQueryValue(...)httpx.parseSetCookiePair(...)httpx.parseCookiePair(...)httpx.mimeTypeFromPath(...)httpx.mimeTypeFromPathOr(...)httpx.mimeTypeFromPathWith(...)httpx.MimeMappinghttpx.defaultMimeMappingshttpx.encodeVarInt(...)httpx.decodeVarInt(...)
API Groups ​
- Client API
- Concurrency API
- Core API
- Middleware API
- Network API
- Pool API
- Protocol API
- Router API
- Server API
- TLS API
- Utilities API
Explicit Support Notes ​
- HTTP/1.0 and HTTP/1.1 are production runtime paths in the high-level client/server API.
- HTTP/2 has high-level client and server runtime paths plus full protocol primitives (HPACK/framing/streams).
- HTTP/3 has high-level client and server runtime paths over UDP/QUIC stream framing, plus full protocol primitives (QPACK/HTTP3/QUIC framing).
- Cross-platform validation is maintained for Linux/Windows (x86, x86_64, aarch64) and macOS (x86_64, aarch64) build matrices.
Customization and Callbacks ​
- Client interceptors for request/response hooks:
addInterceptor(...) - Server logging sinks via
ServerConfig.log_fn - Middleware logger customization via
loggerWithConfig(.{ .log_fn = ... }) - Request and response JSON helpers:
RequestOptions.withJson(...),Response.json(T, options),Response.jsonLeaky(T, options) - Socket and UDP primitives:
Socket,UdpSocket,SocketIoReader,SocketIoWriter - Custom middleware structs with
handlerfunctions
