* Fix changelog entry for MSRV change in axum-extra 0.3.5
* Bump MSRV to 1.60 for axum, axum-extra, axum-macros
* Use new Cargo features to avoid implicit features for optional dependencies
* Prepare axum-next branch
* Remove deprecated `extractor_middleware` function (#1077)
* Allow `Error: Into<Infallible>` for `Route::{layer, route_layer}` (#948)
* Allow `Error: Into<Infallible>` for `Route::{layer, route_layer}` (#924)
* Allow `Error: Into<Infallible>` for `Route::{layer, route_layer}`
Fixes https://github.com/tokio-rs/axum/issues/922
* changelog
* fixup changelog
* Panic on overlapping routes in `MethodRouter` (#1102)
* Panic on overlapping routes in `MethodRouter`
* changelog link
* add test to ensure `head` and `get` don't overlap
* Fix changelog
* Prepare axum-next branch
* Remove trailing slash redirects
* changelog link
* Fix changelog
* remove asserting to make make the test more clear
* remove tsr related feature
* Add `RouterExt::route_with_tsr`
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* Update axum-extra/src/routing/mod.rs
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* fix typos in docs
* Update axum/CHANGELOG.md
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* mention `RouterExt::route_with_tsr` in the changelog
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* Support `Option` and `Result` in typed paths
* changelog
* Update axum-extra/CHANGELOG.md
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* fix one more
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* move signed cookies into their own module
* Require features for private/signed cookies
* enable "cookie" feature when enabling private/signed cookies
* add `#[cfg]`s in a few more places
* Remove unnecessary default features for axum from axum-extra
* Update changelog
Co-authored-by: Leon Felix List <uwdxx@student.kit.edu>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
* Add `IntoResponseParts`
* docs
* Add test
* don't allow overriding body or response
* macroify impls
* re-order things a bit
* Fix tests
* Also allow overriding version
* Move things into separate modules
* docs
* clean up
* fix trybuild test
* remove churn
* simplify buliding response
* fixup test
* fix docs typo
* Use `HeaderValue::from_static`, might be faster
* Bring back `impl IntoResponse` in example
* Remove blanket impl to improve error message
* don't need to set `content-type`
* Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* changelog
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* Easily convert typed paths into URIs
`#[derive(TypedPath)]` will now also generate `TryFrom<_> for Uri` for
easily converting paths into URIs for use with `Redirect` and friends.
Fixes https://github.com/tokio-rs/axum/issues/789
* Use a method on the `TypedPath` trait to convert to `Uri`
* fix doc ref
* Update changelogs
* 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 <jplatte@users.noreply.github.com>
* add note about Display/Serialize being compatible
* Update axum-extra/src/routing/typed.rs
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* 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 <jplatte@users.noreply.github.com>
* rephrase args
* changelog
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* Remove `RequestParts::take_extensions`
* fix out of date docs
* Remove RequestAlreadyExtracted and replace it with BodyAlreadyExtracted
* fix docs
* fix test
* Update axum-core/src/extract/mod.rs
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* Remove macro only used once
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
* Add `middleware::from_fn` for creating middleware from async fns
* More trait impls for `Next`
* Make `Next::run` consume `self`
* Use `.router_layer` in example, since middleware returns early
* Actually `Next` probably shouldn't impl `Clone` and `Service`
Has implications for backpressure and stuff
* Simplify `print-request-response` example
* Address review feedback
* add changelog link
* extra: Add `Cached` extractor
`Cached` wraps another extractor and caches its result in request
extensions.
* Use newtype to avoid overriding extensions of the same type
* Rename type param
* Add `axum-extra` crate
Empty for now but now we have a place to put stuff.
I'll make a PR for moving over https://github.com/davidpdrsn/axum-resource.
* remove `authors` field from `Cargo.toml`s