Add Body::from_stream (#1848)

This commit is contained in:
David Pedersen
2023-03-23 20:23:34 +01:00
parent a4b7d3843c
commit 0d50d17304
8 changed files with 80 additions and 30 deletions
+2 -4
View File
@@ -7,7 +7,7 @@ use axum::{
body::{Body, Bytes},
extract::FromRequest,
response::{IntoResponse, Response},
BoxError, RequestExt,
RequestExt,
};
use futures_util::stream::Stream;
use http::{
@@ -405,9 +405,7 @@ impl std::error::Error for InvalidBoundary {}
mod tests {
use super::*;
use crate::test_helpers::*;
use axum::{
body::Body, extract::DefaultBodyLimit, response::IntoResponse, routing::post, Router,
};
use axum::{extract::DefaultBodyLimit, response::IntoResponse, routing::post, Router};
#[tokio::test]
async fn content_type_with_encoding() {