Taxum / @taxum/core / http
http
Module for unified HTTP request/response handling.
This module defines the common building blocks for HTTP requests and responses.
⚠ Ownership and Reuse Contract
Instances of HttpResponse
and its subcomponents (HeaderMap
, Body
, Extensions
) are intended to be owned, single-use values.
- Do not share or reuse these instances across multiple responses, layers, global variables, or handlers.
- Construct fresh instances for each response to avoid side effects, shared state bugs, and data corruption.
This design avoids unnecessary cloning for performance-critical applications and relies on well-behaved usage. Reusing parts of a response is explicitly unsupported and considered undefined behavior.
Classes
- Body
- Encoding
- ExtensionKey
- Extensions
- HeaderMap
- HeaderValue
- HttpRequest
- HttpRequestBuilder
- HttpResponse
- HttpResponseBuilder
- HttpResponseParts
- Method
- Parts
- Redirect
- SizeHint
- StatusCode
Type Aliases
- BodyLike
- HeaderEntry
- HeaderEntryLike
- HeaderValueLike
- HttpResponseLike
- HttpResponseLikePart
- JsonSerializable
- SupportedEncodings
- ToHttpResponse
- ToHttpResponseParts
- ToHttpResponsePartsLike