Available on crate feature
http only.Expand description
Turning documents and errors into HTTP responses.
A handler returns Created, Ok or a JsonApiError and gets the
right status, the JSON:API media type, and a correctly shaped body. None
of that is assembled at a call site.
Structs§
- Created
201 Createdwith the resource and itsLocationheader.- Download
- Raw bytes, with their own media type — a file, not a document.
- Errors
- Several errors in one response.
- Fetched
200 OKwith a document.- NoContent
204 No Content— a successful delete.- Streamed
streaming - A JSONL body, written one line at a time.
Functions§
- disposition
- Build a
Content-Dispositionvalue, safely.