Commit graph

23 commits

Author SHA1 Message Date
David Pedersen
5be73c1064
axum-core: Version 0.2.4 (#984) 2022-05-02 11:52:24 +02:00
David Pedersen
8dd6070574
Implement IntoResponse for (Parts | Request<()>, $(impl IntoResponseParts)+, impl IntoResponse) (#980)
* Implement `IntoResponse for (Parts | Request<()>, $(impl IntoResponseParts)+, impl IntoResponse)`

Fixes #979

* changelog

* docs

* changelog ref
2022-04-29 22:08:47 +02:00
Marcus Griep
6e1835074c
Implement IntoResponse for Response<()> and response::Parts (#950)
* feat(axum-core): add IntoResponse for `http::response` types

* chore: narrow impl to `Response<()>`

* include extensions

* changelog

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-04-29 17:52:21 +02:00
David Pedersen
5bb924b3a2
Implement IntoResponse and IntoResponseParts for http::Extensions (#975)
* Implement `IntoResponse` and `IntoResponseParts` for `http::Extensions`

Requires a new release of `http`.

* remove http patch

* changelog ref
2022-04-29 17:28:24 +02:00
David Pedersen
0702c59c7d
axum-core: Version 0.2.3 (#966) 2022-04-26 14:19:47 +00: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
David Pedersen
598e6935df axum-core: Version 0.2.2 2022-04-19 16:17:52 +02:00
David Pedersen
afcefb4a70
Add AppendHeaders (#927)
* Add `AppendHeaders`

* axum changelog
2022-04-17 23:14:04 +02:00
David Pedersen
bcda1a97db axum-core: Version 0.2.1 2022-04-03 20:21:16 +02:00
Jonas Platte
1191b58083
Add RequestParts::extract (#897) 2022-04-01 09:25:15 +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
a0ae0c48aa
Make RequestParts::body_mut return &mut Option<B> (#869) 2022-03-18 15:39:13 +00:00
David Pedersen
88974f4299
Add missing changelog items (#845)
* Add missing changelog items

* Update axum/CHANGELOG.md

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

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-03-09 15:07:41 +00:00
David Pedersen
f12ab072c5
Add IntoResponseParts (#797)
* Add `IntoResponseParts`

* docs

* Add test

* don't allow overriding body or response

* macroify impls

* re-order things a bit

* Fix tests

* Also allow overriding version

* Move things into separate modules

* docs

* clean up

* fix trybuild test

* remove churn

* simplify buliding response

* fixup test

* fix docs typo

* Use `HeaderValue::from_static`, might be faster

* Bring back `impl IntoResponse` in example

* Remove blanket impl to improve error message

* don't need to set `content-type`

* Apply suggestions from code review

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>

* changelog

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
2022-02-28 23:04:33 +00:00
Olivier Pinon
d12494cc9c
Add IntoResponse impl for BytesMut and Chain (#767)
* Add IntoResponse impl for BytesMut and Chain

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

* Add CHANGELOG entry

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-02-17 13:30:42 +01:00
David Pedersen
4f6e86f026 Fixup changelogs 2022-01-25 09:46:26 +01:00
David Pedersen
b1ef0be1a7 Remove RequestParts::take_extensions (#699)
* Remove `RequestParts::take_extensions`

* fix out of date docs

* Remove RequestAlreadyExtracted and replace it with BodyAlreadyExtracted

* fix docs

* fix test

* Update axum-core/src/extract/mod.rs

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>

* Remove macro only used once

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
2022-01-23 18:01:52 +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
9f6be24ecd
axum: Version 0.4.2 (#592)
* axum: Version 0.4.2

This time depending on the correct version of axum-core.

* add missing changelog links
2021-12-06 12:03:13 +00:00
David Pedersen
8e1341d1f6
Release axum, axum-core, and axum-debug (#591) 2021-12-06 10:30:09 +01:00
David Pedersen
a63843d6c5
Release axum, axum-core, and axum-extra (#582) 2021-12-02 20:02:38 +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