Commit graph

13 commits

Author SHA1 Message Date
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
6d01f3968e
axum-extra: Version 0.1.2 (#705)
- **fix:** Depend on tower with `default_features = false` ([#666])

[#666]: https://github.com/tokio-rs/axum/pull/666
2022-01-13 10:37:56 +01:00
Sabrina Jewson
031e0fd472
Store Bytes in ErasedJson (#672) 2021-12-28 10:41:21 +00:00
David Pedersen
de37a3e737
Tweak tower dependency in axum-extra (#666)
Fixes https://github.com/tokio-rs/axum/issues/659
2021-12-27 23:28:58 +01:00
Sabrina Jewson
7df611319e
Fix axum-extra's optional feature documentation (#663) 2021-12-27 18:12:46 +01:00
David Pedersen
9f5f29dfba
axum-extra: Version 0.1.1 (#658)
- Add `middleware::from_fn` for creating middleware from async functions ([#656])

[#656]: https://github.com/tokio-rs/axum/pull/656
2021-12-27 15:23:02 +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
a63843d6c5
Release axum, axum-core, and axum-extra (#582) 2021-12-02 20:02:38 +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
Pure White
5a5800c1ae
feat: default to charset=utf-8 for text content type (#554)
* feat: default to charset=utf-8 for text content type

* added changelog && fix comment

* fix workflow
2021-11-25 08:31:30 +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