diff --git a/examples/requests/src/streaming.rs b/examples/requests/src/streaming.rs index c59cc6e..414d34f 100644 --- a/examples/requests/src/streaming.rs +++ b/examples/requests/src/streaming.rs @@ -5,10 +5,11 @@ use futures::StreamExt; async fn index(mut body: web::Payload) -> Result { let mut bytes = web::BytesMut::new(); while let Some(item) = body.next().await { - bytes.extend_from_slice(&item?); + let item = item?; + println!("Chunk: {:?}", &item); + bytes.extend_from_slice(&item); } - println!("Chunk: {:?}", bytes); Ok(HttpResponse::Ok().finish()) } //