Commit Graph
23 Commits
Author SHA1 Message Date
John DowneyandDavid Pedersen db22b7309d Remove remnants of spa feature (#1802)
Co-authored-by: David Pedersen <[email protected]>
2023-03-03 14:43:19 +00:00
David Pedersen aa2cbf6920 Add axum_extra::extract::Multipart (#1692) 2023-03-03 10:15:09 +01:00
David PedersenandAllan 6a4825bb22 Rename ProtoBuf to Protobuf (#1763)
Co-authored-by: Allan <[email protected]>
2023-02-24 21:40:42 +01:00
David Pedersen 37922ab840 Add option_layer (#1696) 2023-02-11 23:11:21 +00:00
David Pedersen b4204e223d Add TypedPath::with_query_params (#1744) 2023-02-11 22:10:07 +00:00
Allan b1f7ee938d Update axum-extra feature flag table (#1594) 2022-11-29 22:11:36 +00:00
Marek BarvířandMarek Barvíř be54583d98 Reexport key-expansion (#1425)
* Reexport key-expansion

* Description

Co-authored-by: Marek Barvíř <[email protected]>
2022-09-28 20:06:56 +00:00
Jonas Platte 69d64cecc3 Split RouterService off of Router (#1381) 2022-09-22 12:10:55 +02:00
David PedersenandJonas Platte e22f6f9d2b Add Either{2..8} to axum-extra (#1263)
* Add `Either{2..8}`

* Apply suggestions from code review

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

* Either2 => Either

* Update axum-extra/src/either.rs

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

Co-authored-by: Jonas Platte <[email protected]>
2022-08-17 08:57:19 +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
David Pedersen 6b6a415622 Add JsonLines extractor and response (#1093) 2022-06-20 20:49:18 +02:00
David Pedersen 453202b490 Document all cargo features (#1079) 2022-06-10 08:46:09 +02:00
David Pedersen 73b1bafbf8 Add AsyncReadBody (#1072)
* Add `AsyncReadBody`

* changelog

* sort cargo.toml
2022-06-08 11:02:42 +02:00
David Pedersen 405e3f8c44 Add SpaRouter (#904) 2022-04-03 18:29:37 +02:00
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 9004a14302 Move middleware::from_fn into axum (#719)
* Move `middleware::from_fn` into axum

* changelog

* fix feature

* Rephrase changelog a bit
2022-01-25 10:19:06 +01:00
David Pedersen f4716084a7 Add middleware::from_fn for creating middleware from async fns (#656)
* 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
2021-12-27 14:01:26 +01:00
David Pedersen 96b353b556 Add Cached extractor (#565)
* 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
2021-11-25 10:14:31 +00: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 f9a437d081 Add Resource to axum-extra (#538) 2021-11-17 22:31:43 +00:00
Jonas Platte b43b9ed69d Add axum_extra::response::ErasedJson (#537) 2021-11-17 22:54:02 +01:00
David Pedersen a16ea65031 Add axum-extra crate (#536)
* 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
2021-11-17 20:00:32 +00:00