This crate represents a first pass at a utility crate for creating APIs with trillium.rs.
Currently, this crate supports receiving
application/x-form-www-urlencoded by default. To disable
application/x-form-www-urlencoded support, use
default-features = false.
This crate currently only supports sending json responses, but may
Accepts negotiation and further outbound response
ApiHandler provides an easy way to deserialize a single type from
the request body, with a default approach to handling invalid
serialization. ApiHandler does not handle serializing responses, so is
best used in conjunction with
ApiConnExt::with_json. If you need
custom handling for deserialization errors, use
ApiConnExt::deserialize instead of
serde_json::Value from a JSON literal.
Trillium API handler
Represents any valid JSON value.