Add Body::from_stream (#1848)

This commit is contained in:
David Pedersen
2023-04-21 17:45:31 +02:00
parent 4e4c29175f
commit 72c1b7a80c
7 changed files with 79 additions and 29 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::{
@@ -410,9 +410,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() {