Commit Graph
5 Commits
Author SHA1 Message Date
Sunli be68227d73 Use pin-project-lite instead of pin-project (#95) 2021-08-03 09:33:00 +02:00
David Pedersen f32d325e55 Make extractors easier to write (#36)
Previously extractors worked directly on `Request<B>` which meant you
had to do weird tricks like `mem::take(req.headers_mut())` to get owned
parts of the request.

This changes that instead to use a new `RequestParts` type that have
methods to "take" each part of the request. Without having to do weird
tricks.

Also removed the need to have `B: Default` for body extractors.
2021-07-22 13:23:50 +02:00
David Pedersen 341ad61240 Clarify body extractors 2021-07-10 23:46:14 +02:00
David Pedersen 62da1eac00 Allow extractor_middleware to extract the body 2021-07-10 23:39:40 +02:00
David Pedersen 1cbd43cfc4 Add extractor_middleware (#29)
Converts an extractor into a middleware so it can be run for many routes
without having to repeat it in the function signature.
2021-07-09 23:38:59 +02:00