Add RequestExt::{with_limited_body, into_limited_body} (#1420)

* Move RequestExt and RequestPartsExt into axum-core

* Add RequestExt::into_limited_body

… and use it for Bytes extraction.

* Add RequestExt::with_limited_body

… and use it for Multipart extraction.

Co-authored-by: David Pedersen <[email protected]>
This commit is contained in:
Jonas Platte
2022-09-28 20:20:47 +00:00
committed by GitHub
co-authored by David Pedersen
parent be54583d98
commit b94248191e
10 changed files with 87 additions and 44 deletions
+3
View File
@@ -52,6 +52,7 @@
pub(crate) mod macros;
mod error;
mod ext_traits;
pub use self::error::Error;
pub mod body;
@@ -60,3 +61,5 @@ pub mod response;
/// Alias for a type-erased error type.
pub type BoxError = Box<dyn std::error::Error + Send + Sync>;
pub use self::ext_traits::{request::RequestExt, request_parts::RequestPartsExt};