Commit graph

557 commits

Author SHA1 Message Date
z-o-n-n-e
bc8e879d7b
Fix typo in docs (#2080) 2023-07-09 22:00:01 +02:00
Rodrigo Santiago
b80d126137
Remove bitflags crate dependency (#2073)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-07-05 20:08:11 +00:00
jachii
0ed02a9a46
Add axum::extract::Query::try_from_uri (#2058)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-07-03 07:35:59 +00:00
David Pedersen
cc9629fe88 Fix some typos in the docs 2023-07-03 09:23:37 +02:00
Alexander van Ratingen
adb387a370
Implement IntoResponse for boxed slices (#2035) 2023-06-26 11:14:28 +00:00
Alex Butler
26daec2b17
Update tokio-tungstenite to 0.19 (#2021)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-06-23 00:03:30 +02:00
Wowkster
8016e7890c
docs: add note about large file multipart uploads (#2025)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-06-22 23:59:39 +02:00
Vitaly Shukela
8dae97a5e8
docs: Add links to more examples of Result-returning handlers. (#2049)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-06-22 23:41:13 +02:00
mohad12211
652d65aabc
docs: update router::route multiple methods docs (#2051)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-06-22 21:36:37 +00:00
Cyril Marpaud
c26dcd90b3
Fix a typo in axum::middleware (#2056)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-06-22 21:34:38 +00:00
Azzam S.A
8374c3e789
docs: add warning icon for extractor order (#2027) 2023-06-05 12:05:53 +02:00
Jerry Wang
59d6a7b31a
Fix a typo in axum::extract::rejection::FailedToDeserializeQueryString documentation (#2009) 2023-05-19 10:37:21 +02:00
Matt Fellenz
b0eb7a24bc
Fix localhost vs 0.0.0.0 discrepancy (#1984) 2023-05-03 21:17:18 +00:00
David Pedersen
b663072504
Don't remove the Sec-WebSocket-Key header in WebSocketUpgrade (#1972) 2023-04-30 11:54:41 +02:00
David Pedersen
c7d4af9bd8
Fix fallback panic on CONNECT requests (#1963) 2023-04-25 16:01:39 +02:00
David Pedersen
d1765d9a00
Don't inherit fallbacks when using Router::nest_service (#1956) 2023-04-22 16:19:32 +02:00
David Pedersen
db300efc33
Remove impl Connected<&AddrStream> for SocketAddr (#1954) 2023-04-21 18:24:47 +02:00
David Pedersen
4d5035faf8 Use Request type alias in new files 2023-04-21 17:45:31 +02:00
David Pedersen
877e3fe4de Move TypedHeader to axum-extra (#1850)
Co-authored-by: Michael Scofield <mscofield0@tutanota.com>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2023-04-21 17:45:31 +02:00
David Pedersen
173f9f72b0 Remove IntoResponse for http-body types (#1877) 2023-04-21 17:45:31 +02:00
David Pedersen
c97967252d Add serve function and remove Server re-export (#1868) 2023-04-21 17:45:31 +02:00
David Pedersen
6703f8634c Remove B type param: Follow ups (#1789)
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: Michael Scofield <mscofield0@tutanota.com>
2023-04-21 17:45:31 +02:00
David Pedersen
72c1b7a80c Add Body::from_stream (#1848) 2023-04-21 17:45:31 +02:00
David Pedersen
4e4c29175f Remove B type param (#1751)
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: Michael Scofield <mscofield0@tutanota.com>
2023-04-21 17:45:31 +02:00
Michael Scofield
9be0ea934c Fix typo in extract::ws (#1664)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-04-21 17:45:31 +02:00
David Pedersen
3ba74aa2f5 Change sse::Event::json_data to use axum_core::Error as its error type (#1762) 2023-04-21 17:45:31 +02:00
David Pedersen
97885484dd Add note about main having breaking changes 2023-04-21 17:44:27 +02:00
David Pedersen
c31bea2f96
Release axum and axum-extra (#1942) 2023-04-18 20:40:42 +02:00
David Pedersen
994492d427
Add test for not hitting debug_assert in MatchedPath (#1935) 2023-04-17 13:46:54 +02:00
David Pedersen
b42897f2dc
Document that Router::new().fallback(...) isn't optimal (#1940) 2023-04-17 13:41:53 +02:00
David Pedersen
2c87d65f17
Don't allow extracting MatchedPath in fallbacks (#1934) 2023-04-17 13:20:54 +02:00
David Pedersen
39bb28130d
Enable println warning (#1929) 2023-04-14 22:26:56 +02:00
David Pedersen
377d73a55b Add basic merge and nest benchmarks 2023-04-12 19:14:16 +02:00
David Pedersen
cf1ed9bb54
Release axum 0.6.15 (#1928) 2023-04-12 09:36:17 +02:00
David Pedersen
8b22b94582 Remove "PathDeserializationError" debug message 2023-04-12 09:19:00 +02:00
Andrew Silver
31aed243d9
Remove "NotFound hit" debug message (#1927) 2023-04-11 23:38:21 +02:00
David Pedersen
b92b91e75e
Release axum 0.6.14 (#1926) 2023-04-11 19:38:22 +02:00
Andrew Silver
21d496ddb1
Removed leftover "path_router hit" debug message (#1925) 2023-04-11 17:02:19 +00:00
David Pedersen
51edc9c895
Release (#1923) 2023-04-11 17:23:38 +02:00
David Pedersen
6b106f4bab
Log built-in rejections (#1890) 2023-04-11 16:57:49 +02:00
David Pedersen
2c2cf361dd
Change Router::nest to flatten the routes (#1711)
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2023-04-11 16:17:54 +02:00
David Pedersen
4db9b6eb81 add missing changelog link 2023-04-10 09:23:55 +02:00
David Pedersen
352cf9a266
Implement Deref and DerefMut for built-in extractors (#1922) 2023-04-10 07:18:35 +00:00
Jonas Platte
43b2d52403
Add OptionalPath extractor (#1889)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-04-09 12:23:13 +00:00
J
946d8c3253
Fix a typo inside handlers_intro.md (#1919) 2023-04-09 08:08:58 +02:00
David Pedersen
9b1f1a907b
Update allowed crates in public API (#1888) 2023-03-27 17:12:19 +02:00
Jonas Platte
eec4195eac
Fix broken links in the documentation (#1878) 2023-03-23 14:55:56 +00:00
Roman Zaynetdinov
4a02ab3ed8
Use State extractor in WS module docs (#1880) 2023-03-23 13:24:02 +01:00
Andrew Morgan
b314cd9bc2
Fix a small grammatical error in the Extract docs (#1876) 2023-03-22 17:34:12 +00:00
David Pedersen
562fa206f0
Release axum, axum-extra, axum-macros (#1875) 2023-03-22 15:22:47 +01:00
David Pedersen
3fb67bf79d Update changelog 2023-03-22 14:35:06 +01:00
David Pedersen
a0af61ea46
More clearly document what wildcards matches (#1873) 2023-03-22 10:48:23 +00:00
David Pedersen
03e8bc77f1
Implement IntoResponse for MultipartError (#1861) 2023-03-21 08:24:06 +00:00
David Pedersen
8e1eb8979f
Update to syn 2 (#1862) 2023-03-18 19:23:27 +00:00
David Pedersen
1133425d6b
Release axum, axum-macros, and axum-extra (#1843) 2023-03-13 11:00:13 +01:00
David Pedersen
fe9c4a0b5b
Clone state a bit less (#1837) 2023-03-12 14:43:22 +00:00
Jonas Platte
f65fa22f34
Improve tower-http doc links (#1842) 2023-03-12 11:15:58 +01:00
tottoto
5793e75aac
Change tower-http to optional (#1838) 2023-03-10 17:23:50 +01:00
David Pedersen
5c11c5c44d Print prev_route_id in impl Debug for Router 2023-03-10 12:30:08 +01:00
David Pedersen
e56e1b3e69
Don't require S: Debug for impl Debug for Router<S> (#1836) 2023-03-10 11:14:40 +00:00
Alex Butler
f9f64a3ecd
Unpin itoa dependency (#1815) 2023-03-05 14:28:10 +01:00
David Pedersen
bc3c35ea5a
Release all the crates (#1812) 2023-03-03 18:16:24 +01:00
Ingvar Stepanyan
fd96bce34d
Gracefully handle missing headers (#1810)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-03-03 15:35:49 +01:00
David Pedersen
5606ea3f9e
#[must_use] all the things! (#1809) 2023-03-03 14:12:35 +01:00
David Pedersen
5a58edac16
Fix routing issues when loading a Router via a dynamic library (#1806) 2023-03-03 13:23:53 +01:00
Jonas Platte
43883b8d9b
Replace weird doc paragraph by compiler-checked must_use attribute (#1801)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-03-03 08:54:38 +00:00
sharkspear94
73be489e03
Fixed small typo (#1804) 2023-03-03 09:43:24 +01:00
Rob
68bf8ed7fc
Update documentation for FailedToDeserializeQueryString response type (#1795) 2023-02-27 22:29:39 +00:00
Spencer Bartholomew
6067223fcc
update tokio dep to fix potential security vulnerability (#1787) 2023-02-27 18:40:03 +01:00
David Pedersen
08bac36519
Release axum and axum-extra (#1788) 2023-02-27 09:41:11 +01:00
Robin Stocker
37e2a7d5e7
docs: Clarify that state parameters need to come before body too (#1785) 2023-02-25 10:13:32 +00:00
David Pedersen
f726f16b6d
Update to tower-http 0.4 (#1783) 2023-02-24 20:51:30 +00:00
David Pedersen
37478772bc
Release axum (#1782) 2023-02-24 14:22:47 +01:00
David Pedersen
2cbaa63d9e
Add KeepAlive::event (#1729) 2023-02-23 13:14:29 +00:00
Hugh Mandalidis
1f224396a2
Add shared mutable state documentation (#1759)
Co-authored-by: Vagelis Prokopiou <vagelis.prokopiou@gmail.com>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-02-23 12:44:25 +00:00
Hugo
fa36b49769
Add hint for on further details for WebSocket (#1779) 2023-02-22 12:25:37 +00:00
David Pedersen
1e2567c39f
Fix missing Allow when middleware are applied to MethodRouter (#1773) 2023-02-20 22:54:44 +01:00
David Pedersen
277be8f813
axum 0.6.7 (#1768) 2023-02-17 15:07:23 +01:00
David Pedersen
bea84d2141 Add missing things back to changelog 2023-02-17 14:25:03 +01:00
David Pedersen
143c415955
Add MockConnectInfo (#1767) 2023-02-17 13:09:29 +01:00
David Pedersen
cd86f7ec7a
Use 422 Unprocessable Entity for Form deserialization errors, except GET and HEAD requests (#1683) 2023-02-17 09:59:02 +01:00
David Pedersen
e6ff0281ae
Try cargo public-api-crates on CI (#1761) 2023-02-16 22:41:41 +01:00
David Pedersen
c18ff9dd63
Release axum, axum-extra, and axum-macros (#1750) 2023-02-12 12:40:42 +01:00
Jonas Platte
2c9d2dea0e
Upgrade dependencies (#1746) 2023-02-11 23:36:40 +00:00
David Pedersen
0ecf5eeb19
Support passing MethodRouter to Router::fallback (#1730) 2023-02-11 23:11:55 +01:00
Cole
5c58b4ffde
Avoid unnecessary clones of state in MethodRouter (#1745) 2023-02-11 21:44:48 +00:00
David Pedersen
93ecabf449
Release axum and axum-macros (#1743) 2023-02-11 22:32:16 +01:00
David Pedersen
827140f0d7
Document gotchas with impl IntoResponse (#1736) 2023-02-07 21:28:00 +00:00
David Pedersen
6e6aa8f39e Don't use impl IntoResponse in readme 2023-02-07 17:57:28 +01:00
David Pedersen
4a5dc4391c
Release axum and axum-macros (#1721) 2023-01-24 13:31:33 +01:00
David Pedersen
47be78e0b3
Use map_while (#1720) 2023-01-24 12:49:36 +01:00
David Pedersen
6ff6b36293
Release axum and axum-core (#1716) 2023-01-20 23:51:19 +01:00
David Pedersen
5b07296001
Add RawPathParams (#1713) 2023-01-20 20:37:01 +00:00
David Pedersen
96b7d78a3f
Document required tokio features for example (#1715) 2023-01-20 20:26:40 +00:00
David Pedersen
7a52161826
Implement Clone and Service for Next (#1712) 2023-01-20 21:19:01 +01:00
Jonas Platte
7ecf8bd6cf
Use implicit format-args captures where applicable (#1709) 2023-01-20 12:04:49 +01:00
David Pedersen
8c081c20ab Remove accidentally committed dbg!s 2023-01-20 10:14:49 +01:00
David Pedersen
1be25d9496
Add internal macro to make tests of nest easier to write (#1694) 2023-01-14 14:12:01 +00:00
David Pedersen
607a20dfac
Support deserialize_any for Path (#1693) 2023-01-13 12:27:38 +00:00
David Pedersen
25a46fbe79 fixup changelog 2023-01-13 11:54:30 +01:00
valkyrie_pilot
e4c6d76bca
Implement IntoResponse for [u8; N] and &'static [u8; N] (#1690)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2023-01-13 09:12:51 +00:00
David Pedersen
e3aaeb3cb7
Release axum, axum-core, and axum-macros (#1688) 2023-01-09 13:54:49 +01:00
Austaras
6638b274db
Update to base64 0.20 (#1641) 2023-01-08 15:21:24 +00:00
David Pedersen
be9a8c0380
Document breaking changes related to nest (#1684) 2023-01-07 19:06:59 +01:00
David Pedersen
1aa357c879
Misc documentation improvements (#1647)
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2023-01-07 14:07:54 +01:00
Paolo Barbolini
211de92d24
Enable the runtime feature of hyper when using tokio (#1671) 2023-01-06 12:28:31 +01:00
Tobias Bieniek
2d8242b2c5
docs/middleware: Add missing Clone derive on MyLayer (#1649) 2023-01-05 10:47:38 +00:00
Liigo Zhuang
978ae63358
Update extract.md (#1653) 2022-12-19 08:44:03 +01:00
Jonas Platte
b372244099
Guide people to the right places to ask questions (#1631)
* README: Link to discussions instead of issues in Getting Help section

* Link to Discussions and Discord on new issue page
2022-12-09 10:14:31 +01:00
Mario Kaufmann
e3d8868f99
Minor doc fixes (#1622) 2022-12-06 21:46:35 +00:00
David Pedersen
7e13d69639
Add status and body_text methods to built-in rejections (#1612)
* Add `status` and `body_text` methods to built-in rejections

This should make it easier to customize a built-in rejection while
preserving either the status or body.

Fixes https://github.com/tokio-rs/axum/issues/1611

* changelog
2022-12-02 19:54:16 +01:00
Cemre Mengu
5826ca268c
Add missing import of http in docs example (#1613) 2022-12-02 14:47:04 +00:00
tottoto
56d0dd9ec2
Update to tokio-tungstenite-0.18.0 and use sha1 (#1598) 2022-12-02 11:13:57 +01:00
tottoto
dd4e141f4c
Remove outdated link alias from readme (#1591) 2022-11-29 11:51:44 +01:00
David Pedersen
87a80ec47b
axum v0.6.1 (#1588) 2022-11-29 08:43:18 +00:00
tottoto
3279d64f96
Update to matchit 0.7 (#1582) 2022-11-27 10:19:01 +01:00
LeoniePhiline
28f1996f9c
Clarify nested outer fallbacks in CHANGELOG.md (#1581) 2022-11-27 01:03:13 +01:00
David Pedersen
eb2e933054
Expand the docs for Router::with_state (#1580) 2022-11-27 01:01:59 +01:00
David Pedersen
b984fec572 Remove notice about breaking changes from readme 2022-11-25 22:42:35 +01:00
David Pedersen
1b6780cf6c
axum 0.6 and friends 🎉 (#1570)
* changelog

* bump versions

* reorder changelogs a bit

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* Expand fallback inheritance

* Reword tsr

* Mention `parse-body-based-on-content-type` example

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-11-25 12:29:58 +00:00
David Pedersen
0b26411f39
Change Router::with_state and impl Service for Router<()> (#1552)
* Implement `Service` for `Router<(), B>`

* wip

* wip

* fix some tests

* fix examples

* fix doc tests

* clean up docs

* changelog

* fix

* also call `with_state` when converting `MethodRouter` into a `MakeService`

* suggestions from review
2022-11-24 14:43:10 +00:00
jimmycuadra
6771729d27
Improve State and Router docs (#1543) 2022-11-22 09:08:39 +01:00
walfie
7d0bb28876
Minor doc fixes (#1562) 2022-11-22 07:08:18 +00:00
Tshepang Mbambo
3ab3e5f91d
Use http re-export in docs (#1554) 2022-11-20 21:48:41 +01:00
David Pedersen
b816ac7cdf
Add RouterService::{layer, route_layer} (#1550)
* Add `RouterService::{layer, route_layer}`

Figure we might as well have these.

* changelog
2022-11-19 21:51:55 +00:00
Jonas Platte
ce8ea56f3b
Small improvements to RouterService (#1548)
* Fix docstrings on RouterService methods

* Simplify signatures of RouterService methods with Self type
2022-11-19 22:26:12 +01:00
Georg Semmler
d5de3bc7e3
Improve compile errors for unimplemented traits (#1436)
* Improve `debug_handler` to use the correct span for specific bounds

This results in better localised error messages, as they now point
directly to the corresponding argument instead of to the macro itself.

* Improve some error messages behind a `nightly-error-messages` feature
flag

This uses the nightly only `rustc_on_unimplemented` attribute to improve
some error messages when users try to use invalid handler functions.
This should be seen as prove of concept, not as full solution for all
potential error cases.

The underlying feature is currently marked as permanently unstable, but
I'm working on getting this specific attribute (or an attribute with
different name, similar functionality) ready to work on a stable compiler.

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* Enable the `nightly-error-messages` feature unconditionally for nightly compilers

* Use a nightly compiler to run the axum-marcos compile fail tests

* update to newer nightly

* Run axum-macros tests on nightly

* tweak compile error hints a bit

* more tweaks

* update test

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-11-19 12:45:03 +01:00
David Pedersen
2e3000f1a3 Fix typo 2022-11-18 18:36:49 +01:00
David Pedersen
37b9b3df48 Remove duplicate changelog entry 2022-11-18 17:59:05 +01:00
David Pedersen
878ae73e6d
New release candidates (#1541) 2022-11-18 17:29:47 +01:00
David Pedersen
64960bb19c
Type safe state inheritance (#1532)
* Make state type safe

* fix examples

* remove unnecessary `#[track_caller]`s

* Router::into_service -> Router::with_state

* fixup docs

* macro docs

* add missing docs

* fix examples

* format

* changelog

* Update trybuild tests

* Make sure fallbacks are still inherited for opaque services (#1540)

* Document nesting routers with different state

* fix leftover conflicts
2022-11-18 11:02:58 +00:00
David Pedersen
ba8e9c1b21
Add on_failed_upgrade callback to WebSocketUpgrade (#1539)
* Add `on_failed_upgrade` callback to `WebSocket`

Previously if upgrading a connection to a WebSocket connection failed
the background task would panic. There was no way to customize that so
users that might wanna report the error was out of luck.

Panicking also wasn't great because users might abort on panics which
would bring down the server.

* changelog

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-11-18 10:53:04 +00:00
David Pedersen
7090649377
Add fallback inheritance for nested routers (#1521)
* fallback inheritance

* cleanup

* changelog
2022-11-18 10:25:04 +00:00
David Pedersen
2e8a7e51a1
Fix Handler::with_state not working if request body was changed via layer (#1536)
Previously

```rust
handler.layer(RequestBodyLimitLayer::new(...)).with_state(...)
```

didn't work because we required the same request body all the way
through.
2022-11-18 11:00:52 +01:00
danielvschoor
c461f1d827
Add accept_unmasked_frames setting in WebSocketUpgrade (#1529)
* Add accept_unmasked_frames setting in WebSocketUpgrade

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-11-15 09:02:12 +00:00
Taylor Everding
587435940b
Add more tests for the Allow header when returning 405 (#1526)
Refs: #1525, #733
2022-11-14 16:02:05 +01:00
BBaoVanC
370ad07e75
Remove debug_assert in matched_path (#1527) 2022-11-13 02:54:29 +00:00
David Pedersen
74bbe80f8a
axum 0.6.0-rc.4 (#1518) 2022-11-09 13:49:47 +01:00
David Pedersen
028cac4a72
Fix compile error in release mode (#1517) 2022-11-09 13:36:10 +01:00
David Pedersen
1d6a96ee20 Remove references to *_with_state_arc functions from changelog
They were removed again before being released.
2022-11-09 09:27:37 +01:00
David Pedersen
e53c85c496 Minor changelog fixes 2022-11-09 09:20:09 +01:00
David Pedersen
e39d053d2f
New release candidates (#1514)
* New release candidates

* Update axum/Cargo.toml

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-11-09 09:01:47 +01:00
David Pedersen
0e3f9d0938
Don't allow extracting MatchedPath in middleware for nested routes (#1462)
* Don't allow extracting `MatchedPath` for nested paths

* misc clean up

* Update docs

* changelog

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* Add test for nested handler service

* change to `debug_assert`

* apply suggestions from review

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-11-08 20:43:19 +00:00
David Pedersen
e0ef641e5f
Rework Form and Query rejections (#1496)
* Change `FailedToDeserializeQueryString` rejection for `Form`

Its now called `FailedToDeserializeForm`.

* changelog

* Make dedicate rejection type for axum-extra's `Form`

* update trybuild test

* Make dedicate rejection type for axum-extra's `Query`
2022-11-08 20:31:06 +00:00
Jonas Platte
36f24990c8 Fix clippy lints 2022-11-05 11:33:27 +01:00
Jonas Platte
21475f94ff Adjust renamed clippy lint name 2022-11-05 11:33:27 +01:00
David Pedersen
b59c7a8c84
Add example for Router::inherit_state (#1492)
* Add example for `Router::inherit_state`

* clarification

* Update axum/src/routing/mod.rs

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-10-20 19:19:05 +00:00
David Pedersen
4979b4c9b6 Implement Form in terms of RawForm 2022-10-20 20:55:11 +02:00
Marek Kuskowski
bc8a507f58
Add RawForm extractor (#1487)
* Add RawForm extractor

* Change RawForm(String) to RawForm(Option<String>)

* Fix tests

* Use Bytes instead of Option<String> and add tests

* Add test for empty body

* Update CHANGELOG

* small docs tweaks

* changelog nit

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-10-20 18:03:13 +00:00
David Pedersen
9c0a89cd09
Add #[derive(FromRef)] (#1430)
* add `#[derive(FromRef)]`

* tests

* don't support skipping fields

probably wouldn't work at all since the whole state likely needs `Clone`

* UI tests

* changelog

* changelog link

* revert hello-world example, used for testing

* Re-export `#[derive(FromRef)]`

* Don't need to return `Result`

* use `collect` instead of quoting the iterator

* Mention it in axum's changelog
2022-10-10 18:40:14 +00:00