David Pedersen and Jonas Platte
50a4be999d
Update matchit and fix nesting inconsistencies ( #1086 )
...
* Break `Router::nest` into `nest` and `nest_service` methods
* fix doc tests
* update docs
* fix
* Only accept `Router` in `Resource::{nest, nest_collection}`
* update changelog
* fix docs
* fix `MatchedPath` with `Router`s nested with `nest_service`
* Apply suggestions from code review
Co-authored-by: Jonas Platte <[email protected] >
* adjust docs for fallbacks
* Always nest services as opaque
* fix old docs reference
* more tests for `MatchedPath` with nested handlers
* minor clean up
* use identifier captures in format strings
* Apply suggestions from code review
Co-authored-by: Jonas Platte <[email protected] >
* fix test
Co-authored-by: Jonas Platte <[email protected] >
2022-08-11 10:17:08 +00:00
Filip Kieres
7faf059234
Document browsers ignoring SSE events without data fields ( #1242 ) ( #1214 )
2022-08-10 17:14:42 +02:00
David Pedersen
e79820dbc4
Support chaining handlers with one.or(two).or(three) ( #1170 )
...
* WIP: Handler fallbacks
* Docs
* box futures a bit less
* changelog
2022-08-10 10:09:08 +00:00
Jonas Platte
7cbb7cf135
Use new Cargo features to avoid implicit features for optional dependencies ( #1239 )
...
* 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
2022-08-09 18:43:02 +02:00
Jonas Platte
141198ce19
Declare MSRV in Cargo manifests, not .clippy.toml ( #1206 )
2022-07-28 15:31:47 +02:00
Jonas Platte
e6fb53fd68
Fix a typo in axum_extra::extract::Query docs ( #1201 )
2022-07-27 16:32:21 +02:00
David Pedersen
10ab8c7aba
Add missing cfg to axum_extra::extract::Form ( #1194 )
2022-07-26 00:25:45 +02:00
David Pedersen
b243e171fd
Accept S::Response: IntoResponse everywhere ( #1165 )
2022-07-19 18:55:15 +02:00
SzudemJ
73041c8988
Avoid exposure of type names by QueryRejection ( #1171 )
2022-07-18 13:43:18 +00:00
David Pedersen
8c9998eab7
Don't derive debug impl for Resource ( #1153 )
...
We don't actually require `B` to be `Debug` but the derived impl does.
2022-07-11 09:41:41 +02:00
Jonas Platte
8c31bee9bc
docsrs cfg fixes ( #1137 )
...
* Remove unused attribute in axum-core
* Fix docs.rs package metadata for axum-extra
2022-07-01 13:35:52 +02:00
David Pedersen and Jonas Platte
a4c820420d
Remove trailing slash redirects ( #1119 )
...
* 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 <[email protected] >
* Update axum-extra/src/routing/mod.rs
Co-authored-by: Jonas Platte <[email protected] >
* fix typos in docs
* Update axum/CHANGELOG.md
Co-authored-by: Jonas Platte <[email protected] >
* mention `RouterExt::route_with_tsr` in the changelog
Co-authored-by: Jonas Platte <[email protected] >
2022-06-30 00:22:43 +02:00
David Pedersen
905bbfb8e2
axum-extra: Version 0.3.5 ( #1125 )
2022-06-27 21:08:12 +02:00
David Pedersen
523c7fed88
Depend on right version of tokio-stream
2022-06-25 12:26:37 +02:00
David Pedersen
6b6a415622
Add JsonLines extractor and response ( #1093 )
2022-06-20 20:49:18 +02:00
David Pedersen
93251fa203
Bump MSRV to 1.56 and update to the 2021 edition ( #1098 )
2022-06-17 20:11:35 +02:00
David Pedersen
453202b490
Document all cargo features ( #1079 )
2022-06-10 08:46:09 +02:00
David Pedersen
fbb4786851
axum-extra: Version 0.3.4 ( #1074 )
2022-06-08 15:58:37 +02:00
David Pedersen
73b1bafbf8
Add AsyncReadBody ( #1072 )
...
* Add `AsyncReadBody`
* changelog
* sort cargo.toml
2022-06-08 11:02:42 +02:00
David Pedersen
8ff275499b
Add #1049 to changelogs
2022-06-06 18:00:52 +02:00
David Pedersen
19fe93262f
Use impl IntoResponse less in docs ( #1049 )
2022-05-22 13:41:29 +02:00
Jonas Platte and David Pedersen
1d7878c3c8
axum-extra: 0.3.3 ( #1042 )
...
* axum-extra: 0.3.3
* Update axum-extra/CHANGELOG.md
* Update axum-extra/CHANGELOG.md
* depend on axum-macros 0.2.2
Co-authored-by: David Pedersen <[email protected] >
2022-05-18 20:29:49 +02:00
David Pedersen
5948cde6c1
Support customizing rejections for #[derive(TypedPath)] ( #1012 )
...
* Support customizing rejections for `#[derive(TypedPath)]`
* changelog
* clean up
2022-05-17 21:36:05 +02:00
Jonas Platte
b215a87a19
Add axum_extra::extract::Query
2022-05-17 20:19:24 +02:00
David Pedersen
3e722379ac
Add changelog link
2022-05-15 20:07:29 +02:00
David Pedersen
61c4e19598
axum-extra: 0.3.2 ( #1034 )
2022-05-15 20:01:00 +02:00
David Pedersen
178e1801e9
Add axum_extra::extract::Form ( #1031 )
...
* Add `axum_extra::extra::Form`
* update tokio-util ban
2022-05-15 15:17:45 +00:00
David Pedersen
cfdac03c8d
axum-extra: Version 0.3.1 ( #1016 )
2022-05-10 12:05:36 +00:00
David Pedersen
46e6d3493b
axum-macros: Version 0.2.1 ( #1015 )
2022-05-10 11:46:17 +00:00
David Pedersen
b5183afbec
Support wildcards in typed paths ( #1003 )
...
* Support wildcards in typed paths
* changelog
2022-05-06 13:05:30 +02:00
David Pedersen and Jonas Platte
4ff78e552d
Support Option and Result in typed paths ( #1001 )
...
* Support `Option` and `Result` in typed paths
* changelog
* Update axum-extra/CHANGELOG.md
Co-authored-by: Jonas Platte <[email protected] >
* fix one more
Co-authored-by: Jonas Platte <[email protected] >
2022-05-06 09:42:10 +02:00
David Pedersen
a3b6cbc99c
axum-extra: Version 0.3.0 ( #974 )
...
* axum-extra: Version 0.3.0
* add tower-http update to changelog
2022-04-27 10:27:41 +02:00
David Pedersen
700617963f
Move private and signed cookies behind feature flags ( #949 )
...
* 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
2022-04-27 10:11:16 +02:00
David Pedersen
79f6cde3b1
Update to tower-http 0.3.0 ( #965 )
...
* Update to tower-http 0.3.0
* changelog link
2022-04-25 14:59:16 +00:00
3747650ae9
Remove unnecessary default features for axum from axum-extra ( #913 )
...
* Remove unnecessary default features for axum from axum-extra
* Update changelog
Co-authored-by: Leon Felix List <[email protected] >
Co-authored-by: David Pedersen <[email protected] >
2022-04-07 08:24:01 +00:00
David Pedersen
530b0906f7
Fix changelog date
2022-04-03 20:20:50 +02:00
David Pedersen
950dde2664
axum-extra: Version 0.2.1
2022-04-03 20:18:01 +02:00
David Pedersen
405e3f8c44
Add SpaRouter ( #904 )
2022-04-03 18:29:37 +02:00
David Pedersen
01a4c88d7a
Add PrivateCookieJar ( #900 )
2022-04-01 16:37:55 +02:00
David Pedersen
da3ca22301
Fix SignedCookieJar with custom key type ( #899 )
2022-04-01 11:40:42 +02:00
Paolo Barbolini
1b4c54c6e6
axum-extra: re-export the Expiration and SameSite structs from the cookie crate ( #898 )
2022-04-01 10:46:43 +02:00
David Pedersen
5d0a7b440c
axum-extra: Version 0.2.0
2022-03-31 20:48:17 +02:00
David Pedersen
d7860ea9e2
Copy over changelogs from v0.4.x branch ( #893 )
...
* Copy over changelogs from v0.4.x branch
Preparing to release 0.5
* bump crate versions
2022-03-31 20:21:55 +02:00
Evan Schwartz and David Pedersen
3084dc10ca
Accept &str for Redirect ( #889 )
...
* Accept &str for Redirect
* Fix doc example
* fix more docs examples
* update changelog
* fix changelog label
Co-authored-by: David Pedersen <[email protected] >
2022-03-31 10:03:06 +02:00
Jonas Platte
80753f8f5c
Remove unnecessary mut from (Signed)CookieJar examples ( #850 )
2022-03-10 12:53:51 +01:00
David Pedersen and Jonas Platte
f045f2356c
Add cookie management to axum-extra ( #816 )
...
* Cookie management
* fix feature
* Update axum-extra/src/extract/cookie.rs
Co-authored-by: Jonas Platte <[email protected] >
* add tests
* Apply suggestions from code review
Co-authored-by: Jonas Platte <[email protected] >
* less convoluted wording
* changelog
* Make the jars themselves implement `IntoResponseParts`
* dedup tests
* fix docs
Co-authored-by: Jonas Platte <[email protected] >
2022-03-04 10:53:36 +01:00
David Pedersen
d943ba6d81
Replace HasRoutes with Into<Router> ( #819 )
...
* Move `HasRoutes` into axum
* fix doc test
* Just use `Into<Router>`
2022-03-03 21:50:31 +00:00
David Pedersen
bad3abb960
Remove out of date docs
...
These accidentally weren't removed in https://github.com/tokio-rs/axum/pull/790
2022-03-01 14:09:30 +01:00
David Pedersen and Jonas Platte
f12ab072c5
Add IntoResponseParts ( #797 )
...
* 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 <[email protected] >
* changelog
Co-authored-by: Jonas Platte <[email protected] >
2022-02-28 23:04:33 +00:00
David Pedersen
da74084146
Easily convert typed paths into URIs ( #790 )
...
* 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
2022-02-28 09:58:22 +01:00