Altair Bueno and David Pedersen
fb21561616
Add WithRejection ( #1262 )
...
* new(axum-extra): Added `WithRejection` base impl
Based on @jplatte's version (https://github.com/tokio-rs/axum/issues/1116#issuecomment-1215048273 ), with slight changes
- Using `From<E::Rejection>` to define the trait bound on a more concise way
- Renamed variables to something more meaningfull
* revert(axum-extra): Removed `with_rejection` feat
* ref(axum-extra): Replaced `match` with `?`
* tests(axum-extra): Added test for `WithRejection`
* examples: Replaced custom `Json` extractor with `WithRejection`
* docs(axum-extra): Added doc to `WithRejection`
* fmt(cargo-check): removed whitespaces
* fmt(customize-extractor-error): missing fmt
* docs(axum-extra): doctest includes `Handler` test
Co-authored-by: David Pedersen <[email protected] >
* docs(axum-extra):` _ `-> `rejection`
Co-authored-by: David Pedersen <[email protected] >
* docs(axum-extra): fixed suggestions
* fix(axum-extra): `WithRejection` manual trait impl
* revert(customize-extractor-error): Undo example changes
refs: d878eede18 , f9200bf4b9
* example(customize-extractor-error): Added reference to `WithRejection`
* docs(axum-extra): Removed `customize-extractor-error` reference
* fmt(axum-extra): cargo fmt
* docs(axum-extra): Added `WithRejection` to CHANGELOG.md
Co-authored-by: David Pedersen <[email protected] >
2022-08-17 07:59:25 +00:00
David Pedersen
1fe4558362
Move examples to separate workspace ( #978 )
...
* Move examples to separate workspace
* update commands to run examples
* remove debug
2022-04-29 18:53:41 +02:00
David Pedersen and Jonas Platte
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 <[email protected] >
Co-authored-by: Jonas Platte <[email protected] >
2022-03-18 16:53:39 +01:00
Jonas Platte
79b94b9bd6
Replace set_var usage in examples ( #829 )
...
* examples: Fix inconsistent toml formatting
* examples: Replace set_var usage
2022-03-06 12:37:00 +01:00
David Pedersen
184ea656c0
Change HeaderMap extractor to clone the headers ( #698 )
...
* Change `HeaderMap` extractor to clone the headers
* fix docs
* changelog
* inline variable
* also add changelog item to axum
* don't list types from axum in axum-core's changelog
* document that `HeaderMap::from_request` clones the headers
* fix typo
* a few more typos
2022-01-23 18:01:52 +01:00
David Pedersen
254d8fde17
Move FromRequest and IntoResponse into new axum-core crate ( #564 )
...
* Move `IntoResponse` to axum-core
* Move `FromRequest` to axum-core
* some clean up
* Remove hyper dependency from axum-core
* Fix docs reference
* Use default
* Update changelog
* Remove mention of default type
2021-11-30 13:46:13 +00:00
Jonas Platte
9c77ee0295
Use nightly clippy & rustfmt for more style checks ( #487 )
2021-11-09 11:53:57 +00:00
David Pedersen
7692baf837
Reorganize method routers for handlers and services ( #405 )
...
* Re-organize method routing for handlers
* Re-organize method routing for services
* changelog
2021-10-24 20:05:16 +00:00
silvioprog
8ca5538405
Fix typo in main.rs ( #381 )
2021-10-12 18:20:27 +00:00
David Pedersen
ac291baaec
Fix dead code warnings ( #373 )
2021-10-07 16:49:57 +02:00
David Pedersen
f8154a088c
Add example showing up to customize extractor error ( #356 )
...
Lots have been asking about this so makes sense to have an example for.
Once this is merged I'll add a link to it in the docs.
2021-09-30 17:55:58 +00:00