David Pedersen
d927c819d3
Clarify docs around body extractors
2021-07-23 00:27:08 +02:00
David Pedersen
8faed8120f
Docs improvements ( #37 )
2021-07-22 15:00:33 +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
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
David Pedersen
3cd4a1d6a6
Fix for service as bottom handler ( #27 )
...
Would previously fail because of a mismatch in error types.
2021-07-06 09:40:25 +02:00
David Pedersen
356f1c8424
Generic request body ( #22 )
...
Fixes #21
2021-06-19 12:50:33 +02:00
David Pedersen
b6e67eefd7
Add support for extracting typed headers ( #18 )
...
Uses the `headers` crate.
2021-06-15 21:27:21 +02:00
David Pedersen
c41c9e0f78
Support extracting URL params multiple times ( #15 )
...
Useful when building higher order extractors.
2021-06-13 13:06:33 +02:00
David Pedersen
c91dc7ce29
Make Request<Body> an extractor
2021-06-09 09:42:06 +02:00
David Pedersen
90c3e5ba74
Parameterize ContentLengthLimit
2021-06-09 08:14:20 +02:00
David Pedersen
1cf78fa807
More docs
2021-06-08 22:04:28 +02:00
David Pedersen
1f8b39f05d
More docs and expand key_value_store example
2021-06-08 12:43:16 +02:00
David Pedersen
21c96e0aa1
Write a few docs
2021-06-06 23:58:44 +02:00
David Pedersen
46f74895ce
Remove duplicated HandleError
2021-06-06 22:43:53 +02:00
David Pedersen
7620f17edc
Remove some needless type params
2021-06-06 22:41:52 +02:00
David Pedersen
1609191a74
Nesting and more flexible routing dsl
2021-06-06 20:30:54 +02:00
David Pedersen
a005427d40
Write some docs
2021-06-06 15:19:54 +02:00
David Pedersen
46398afc72
Move things around a bit
2021-06-06 11:37:08 +02:00
David Pedersen
c3977d0b71
Change routing DSL
2021-06-04 01:00:48 +02:00
David Pedersen
e156bc40e1
not quite working
2021-06-03 21:36:39 +02:00
David Pedersen
00737c4e0a
checkpoint
2021-06-02 22:07:37 +02:00
David Pedersen
0d7e1e74c4
Adding layers to the whole thing
2021-06-01 21:15:48 +02:00
David Pedersen
8ee3119fb0
More error handling of layered handlers
2021-06-01 17:17:10 +02:00
David Pedersen
ea582ab8d9
Quality of life improvements
2021-06-01 14:52:18 +02:00
David Pedersen
f690e74275
Support nesting services with error handling
2021-06-01 11:23:56 +02:00
David Pedersen
093ad3622e
Some simplifications
2021-06-01 08:32:58 +02:00
David Pedersen
0e38037c74
More error handling
2021-06-01 00:37:07 +02:00
David Pedersen
18f613ff98
This changes everything
2021-05-31 22:54:21 +02:00
David Pedersen
d33be9683c
Don't force handlers to return Results
2021-05-31 20:42:57 +02:00
David Pedersen
f6b1a6f435
More work
2021-05-31 16:28:26 +02:00
David Pedersen
867dd8012c
Add some more tests
2021-05-31 14:04:05 +02:00
David Pedersen
593c901aab
Start writing more tests
2021-05-31 12:22:16 +02:00