Skip to main content

Module http

Module http 

Source
Expand description

Zero-axum public HTTP types.

User code says arcly_http::Response, arcly_http::Json, etc. — no axum::… paths in the public surface. Internally these are thin delegations to axum, so we keep its battle-tested implementation without welding it into the public API.

Why a private axum::response::Response re-export rather than a full newtype: pinning axum::response::Response is the one type the framework’s boundary code constructs; making it a newtype would force every adapter / interceptor to unwrap repeatedly with zero behavioural benefit. A pub use rename achieves the same “no axum in user paths” outcome at zero runtime cost.

Modules§

header
Standard header-name constants: header::CONTENT_TYPE, header::LOCATION, header::CONTENT_RANGE, header::CACHE_CONTROL, header::ACCEPT_RANGES, the header::ACCESS_CONTROL_* family, and the rest of the IANA registry.

Structs§

Body
The body type used in axum requests and responses.
Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
HeaderMap
A specialized multimap for header names and values.
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
Json
JSON response wrapper. Json(body) writes Content-Type: application/json and serialises body with serde_json. Same surface as axum’s Json so the route macro’s return-type walker (Json<T> | Result<Json<T>, _>) keeps working without changes.
Method
The Request Method (VERB)
RequestParts
Component parts of an HTTP Request
ResponseBuilder
An HTTP response builder
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
Uri
The URI component of a request.

Traits§

IntoResponse
Convert a value into a Response.

Functions§

byte_range
Serve a (possibly partial) byte range from a fully-buffered resource.
bytes_response
Build a Response from a status, content type, and raw bytes.
to_bytes
Converts Body into Bytes and limits the maximum size of the body.

Type Aliases§

Response
Type alias for http::Response whose body type defaults to Body, the most common body type used with axum.