Skip to main content

Crate capy_http

Crate capy_http 

Source
Expand description

Thin Axum routing and response conveniences.

Structs§

Created
A JSON response with HTTP 201 Created.
Json
Deserialize or return JSON, using Capy’s safe rejection envelope. Put this extractor last because it consumes the body. Native extraction is available as capy::axum::Json.
NoContent
An empty response with HTTP 204 No Content.
Page
A bounded collection response. The caller supplies a paginated query’s rows.
PageMeta
Conventional pagination metadata. Empty collections have one empty page.
Pagination
Validated, one-based page parameters. Use Query<Pagination> in a handler. Defaults to page 1 and 20 items; page size must be 1..=100.
Path
Deserialize path parameters with safe Capy JSON rejections. Native extraction remains available as capy::axum::extract::Path.
Query
Deserialize a query string with safe Capy JSON rejections. Native extraction remains available as capy::axum::extract::Query.
RouteInfo
A declared route, used by capy routes without connecting to a database.
Routes
A native Axum router together with a small, explicit route inventory.

Functions§

health
The default health response; it deliberately performs no database query.