Commit Graph
6 Commits
Author SHA1 Message Date
David PedersenandJonas Platte 7a228a584b Type safe routing (#756)
* wip

* wip

* make macro implement trait

* checkpoint

* checkpoint

* Simplify things quite a bit

* re-export `axum_macros::TypedPath` from `axum_extra`

* docs

* add missing feature

* fix docs link

* fix features

* fix missing imports

* make serde an optional dep again

* ui tests

* Break things up a bit

* Update span for `FromRequest` impls to point to callsite

* make docs feature labels show up automatically

* Apply suggestions from code review

Co-authored-by: Jonas Platte <[email protected]>

* add note about Display/Serialize being compatible

* Update axum-extra/src/routing/typed.rs

Co-authored-by: Jonas Platte <[email protected]>

* fix missing docs link

* what about typed methods?

* Revert "what about typed methods?"

This reverts commit cc1f989467.

* don't allow wildcards for now

* percent encode params

* Update axum-extra/src/routing/typed.rs

Co-authored-by: Jonas Platte <[email protected]>

* rephrase args

* changelog

Co-authored-by: Jonas Platte <[email protected]>
2022-02-18 14:13:56 +01:00
David Pedersen 515495d957 Set content-length for responses to HEAD requests (#734)
* Set `content-length` internally in `Router`

* changelog

* require `B: HttpBody` at the `impl`

* add changelog refs
2022-01-31 13:48:51 +01:00
Kai Jewson dfb06e721c Introduce Response type alias as a shorthand for Response<BoxBody> (#590)
* Introduce `Response` type alias as a shorthand

* Don't re-export `Response` at the crate root
2021-12-05 19:16:46 +01:00
Jonas Platte 69fee5864d Use .to_owned() instead of .to_string() to turn &str into String (#548) 2021-11-19 22:15:47 +00:00
David Pedersen ab9f1ef993 Change how Resources are added to Routers (#544) 2021-11-19 21:59:07 +01:00
David Pedersen f9a437d081 Add Resource to axum-extra (#538) 2021-11-17 22:31:43 +00:00