Commit graph

821 commits

Author SHA1 Message Date
Nahua
cb6fea37af
Edit readme to make community projects stand out as examples (#956) 2022-04-24 12:49:15 +02:00
takumi
98795b7f75
Replace to_string with to_owned (#960) 2022-04-24 08:05:00 +00:00
takumi
0d2c61c472
Remove needless borrow (#961) 2022-04-24 08:03:54 +00:00
SEKUN
c1b51b5f6e
ecosystem: Add emojied.net to project showcase (#958) 2022-04-23 17:03:20 +02:00
Nathaniel McCallum
8084b242d5
Add response::ErrorResponse and response::Result (#921)
* feat: add response::{Error, Result}

This type makes for efficient use of the `?` operator when in a function
with multiple return error types that all implement `IntoResponse`.

Signed-off-by: Nathaniel McCallum <nathaniel@profian.com>

* misc adjustments from PR review

* Rename to `ErrorResponse` and `ResultResponse`

* nitpicky docs changes

* update changelog

* changelog wording

* Apply suggestions from code review

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

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-04-21 16:24:29 +02:00
Ian Purton
ec38c438e0
Add 'Rust on Nails' article to Axum ecosystem. (#953) 2022-04-21 13:42:32 +02:00
David Pedersen
061e66c236
axum: Version 0.5.3 (#947)
* axum: Version 0.5.3

* Update axum/CHANGELOG.md

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

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-04-19 17:00:51 +02:00
David Pedersen
2adb34c8aa
Revert "Allow Error: Into<Infallible> for Route::{layer, route_layer} (#924)" (#946)
This reverts commit ca7ecb159b.
2022-04-19 16:47:27 +02:00
David Pedersen
883a1cfd8f axum: Version 0.5.2 2022-04-19 16:19:43 +02:00
David Pedersen
598e6935df axum-core: Version 0.2.2 2022-04-19 16:17:52 +02:00
David Pedersen
ca7ecb159b
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
2022-04-19 16:16:54 +02:00
David Pedersen
afcefb4a70
Add AppendHeaders (#927)
* Add `AppendHeaders`

* axum changelog
2022-04-17 23:14:04 +02:00
David Calavera
83e1a15040
Fix trailing redirection with query parameters (#936)
* Fix trailing redirection with query parameters

When the request URI matches a route that need a trailing slash, or has an extra trailing slash, the redirect URI is not generated correctly.

This change adds or removes a trailing slash to the path part of the URI, instead of the full URI, preserving query parameters during redirection.

Signed-off-by: David Calavera <david.calavera@gmail.com>

* Make trailing slash logic safer

Extract parts from Uri and recreate it, so it doesn't bump
into corner cases with string manipulation.

Signed-off-by: David Calavera <david.calavera@gmail.com>

* Remove extra assignment.

Signed-off-by: David Calavera <david.calavera@gmail.com>

* Update axum/src/routing/mod.rs

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>

* changelog

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-04-17 21:12:52 +00:00
Slava
0313c08dc9
helpful note about posting with CORS (#938) 2022-04-17 08:13:22 +00:00
Christos Hadjiaslanis
bef7700fcf
Add shuttle to ECOSYSTEM.md (#935)
shuttle is a serverless platform built for Rust, now with axum support!
2022-04-14 20:18:54 +02:00
zys864
d177a65f24
remove path::de "'any'" unneeded single quotes (#926)
* fix `route` module clippy warning

* remove `path::de` `"'any'"` unneeded singgle quotes,changes to `"any"`

Co-authored-by: zys864 <zys864@gmail.com>
2022-04-09 18:33:44 +02:00
zys864
f13eab893a
fix route module clippy warnings (#920)
Co-authored-by: zys864 <zys864@gmail.com>
2022-04-08 14:28:11 +02:00
zys864
a237edb7c3
Fix example-unix-domain-socket on non-unix platforms (#919)
* remove unused `axum`'s dependency:`tokio-util`

* fix `examples/todos`'s `async fn todos_index` iter_overeager_cloned

* Add docs to `/examples/async-graphql`, just like other xamples.

* remove `examples/async-graphql` unused dependencies `tracing-subscriber` and `trace`

* `examples/chat` deps `trace` and `tracing-subscriber` never be used. Add trace `debug` to `chat`

* remove `examples/print-request-response` unused dependency `axum-extra`

* remove `examples/prometheus-metrics` unused dependency `axum-extra`

* remove `examples/reverse-proxy` unused dependencies `tracing-subscriber` and `trace`

* `examples/chat` fmt fix

* fix `example-unix-domain-socket` compile error on not-unix platforms

Co-authored-by: zys864 <zys864@qq.com>
Co-authored-by: zys864 <zys864@gmail.com>
2022-04-08 11:29:52 +02:00
Fxxxlei
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 <uwdxx@student.kit.edu>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-04-07 08:24:01 +00:00
Simon Sellar
59007d6111
Minor fixup of websocket example logging text. (#910) 2022-04-06 10:33:34 +00:00
Grachev Mikhail
4c936dbb52
Fix a typo in CHANGELOG.md (#906) 2022-04-04 09:26:39 +02:00
Tristan Bouchard
d417910a16
Add Field::chunk (#901)
* Added chunk function to multipart field

This fixes not being able to stream data from a multipart directly into a file or other output.

* doc comment for clarification of usage and &mut self

* fixed formatting

* Corrected example to reflex best practices

* Removed unwrap

* clean up docs

* update changelog

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-04-04 09:26:11 +02:00
David Pedersen
3e716f303f axum: Version 0.5.1 2022-04-03 20:23:18 +02:00
David Pedersen
bcda1a97db axum-core: Version 0.2.1 2022-04-03 20:21:16 +02: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
2270cf7b3e
Add "stream to file" example (#903)
* Add "stream to file" example

* add title tag
2022-04-03 12:28:29 +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
Jonas Platte
1191b58083
Add RequestParts::extract (#897) 2022-04-01 09:25:15 +02:00
Andrew Wheeler(Genusis)
956c9f1d88
Added links to Community Projects Section within ECOSYSTEM.md (#895) 2022-04-01 08:19:14 +02:00
David Pedersen
5d0a7b440c axum-extra: Version 0.2.0 2022-03-31 20:48:17 +02:00
David Pedersen
f69d2dbf40 axum-macros: Version 0.2.0 2022-03-31 20:45:01 +02:00
David Pedersen
cf12b3aa0f Fix version of axum used locally 2022-03-31 20:45:01 +02:00
David Pedersen
fec64bc1b6 axum: Version 0.5.0 2022-03-31 20:37:45 +02:00
David Pedersen
fba2faa38f
axum-core: Version 0.2.0 (#894) 2022-03-31 20:36:12 +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
David Pedersen
21552fe434
Remove bound from into_make_service_with_connect_info (#892)
Fixes #859
2022-03-31 16:49:49 +00:00
Yotam Ofek
2e5d56a9b1
Update outdated Query extractor docs. (#891) 2022-03-31 15:43:54 +02:00
arctic-alpaca
ffb6af7fed
Remove Datafuse from ECOSYSTEM (#890)
Datafuse is no longer using axum, see https://github.com/datafuselabs/databend/issues/2666
2022-03-31 14:25:35 +02:00
Evan Schwartz
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 <david.pdrsn@gmail.com>
2022-03-31 10:03:06 +02:00
Grzegorz Baranski
79501afd10
add ezsockets to community maintained ecosyste (#885) 2022-03-26 16:22:07 +01:00
Tv
dee4e73af4
Typos in docstrings (#886) 2022-03-24 20:56:05 +01:00
Marcus Griep
6aa678e8f2
docs: Add aliri_tower as an ecosystem project (#883) 2022-03-24 20:55:12 +01:00
David Pedersen
56e2d57320
Change Handler to have an associated Future type (#879)
* Change `Handler` to have an associated `Future` type

This removes `#[async_trait]` from `Handler` and replaces that with an
associated `Future` type.

As hinted at in #878 I'm working on something with types that need to
implement `Handler`. I'm doing that by wrapping other `Handler` types so
I can implement `Handler` by simply delegating and thus don't need to
allocate another box for `#[async_trait]`. This change makes that
possible.

It does make `Handler` less ergonomic to implement but thats a very
niche feature so I'm fine with that. It wouldn't be appropriate for
`FromRequest` IMO.

* changelog
2022-03-21 13:32:06 +00:00
David Pedersen
6175f95f41
Unseal handler trait (#878) 2022-03-21 11:55:31 +01:00
David Pedersen
2c985246ba
Fix out of date docs for Json (#871)
Fixes https://github.com/tokio-rs/axum/issues/865
2022-03-19 01:24:28 +01:00
David Pedersen
437fe5b931
Make status codes for JsonRejection more precise (#868)
* Fix status codes for `JsonRejection` rejections

Fixes #865

* Apply suggestions from code review

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

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-03-18 16:53:39 +01:00