- Upgrade to http 1.0.
- Repalce Warp example with Axum example.
- Remove
chronooptional dependency and bumpuuiddependency to "1".
- Add
UnknownandBinarytypes. The former corresponds tounknownin TypeScript, and the latter probably corresponds toBlob(depending on your environment) but is a sort-fo special case that can be useful to support.
- Update to 2021 edition.
- impl
ApiBodyforserde_json::Map<String,T>andserde_json::Number. - ensure Seamless points to its re-export of
serdein the macro so thatserdenot a required dep in projects using Seamless.
- Accept request bodies which are
futures::AsyncRead + Send + Unpinrather thanVec<u8>to allow streaming data into seamless endpoints. Code passing inVec<u8>can be trivially updated to instead takeseamless::handler::request::Bytes::from_vec(body), although optimally you'd make better use of the new streaming capabilities if interested in doing so. - Introduce supporting code for the above, as well as a
Cappedstruct which can wrap things likeFromJsonto impose request body byte limits (using const generics) on specific endpoints.
- Fix bug which made it hard to return a valid value from a handler function that didn't accept a body.
- Minor doc fix.
handler::body::Jsonandhandler::body::Binaryrenamed tohandler::body::FromJsonandhandler::body::FromBinary.handler::response::HandlerResponsealtered so that it is in a better state to be implemented by others, and takes on more of the responsibility of deciding what the response should look like (no hardcoded JSON assumption any more).- Handlers can now return anything implementing
handler::response::HandlerResponse(sync or async).
- Require 'content-type: application/json' when requestion a
Json<_>body in a handler. - Add more documentation around integrating, and more doc improvements.
- Document getting API info. No breaking changes.
RequestParamandRequestBodyrenamed toHandlerParamandHandlerBody, and their methods renamed following a similar convention.- Handler functions can now be either async or non-async, and return
Results orOptions. - Doc and example improvements around state.
- Rename
RequestParam'sget_paramtorequest_param. - A couple of minor tweaks and trait impls.
- Add more documentation.
- Rename and move things around so that they hopefully make more sense (see examples and such for specifics).
- Remove the dependency on
ApiErrorfrom various traits. - Tidy up export hierarchy.
- Allow the expected HTTP method for a route to be configured by implementors of the
Bodytrait. (previously it was always POST if aBodywas provided, else GET). - Remove
IntoApiErrorand implementFrom<T>as appropriate instead. - Remove
Methodenum and usehttp::method::Methodin its place.
Improve on the crate documentation.
Initial release to get the ball rolling.