Expand description
The request and response halves of the specification, expressed as plain functions: body decoding and content negotiation (section 2.1), entity tags (section 7) and problem details (section 5).
crate::app::LinoApp is built from these helpers, and any other HTTP stack
can be wired to the same behaviour by calling them directly.
Structs§
- Decoded
Body - A decoded request body, together with the media type it arrived in.
- Etag
Policy - How a response should treat entity tags and conditional requests.
- Response
Parts - A response ready to be written to the wire.
Constants§
- DEFAULT_
MAX_ BODY_ BYTES - Largest request body accepted by default, in bytes.
Functions§
- append_
vary - Add a field name to
Varywithout repeating it. - build_
problem_ response - Render an error as problem details (specification section 5).
- build_
response - Encode a value as the negotiated representation.
- decode_
request_ body - Decode a request body according to its
Content-Type. - negotiate_
request - Select the representation to produce for a request.