mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-31 00:00:10 +02:00
Remove B type param: Follow ups (#1789)
Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Michael Scofield <[email protected]>
This commit is contained in:
co-authored by
Jonas Platte
Michael Scofield
parent
0d50d17304
commit
2ae0cdf7cf
@@ -6,7 +6,8 @@
|
||||
|
||||
use axum::{
|
||||
body::{Body, Bytes},
|
||||
http::{Request, StatusCode},
|
||||
extract::Request,
|
||||
http::StatusCode,
|
||||
middleware::{self, Next},
|
||||
response::{IntoResponse, Response},
|
||||
routing::post,
|
||||
@@ -38,8 +39,8 @@ async fn main() {
|
||||
}
|
||||
|
||||
async fn print_request_response(
|
||||
req: Request<Body>,
|
||||
next: Next<Body>,
|
||||
req: Request,
|
||||
next: Next,
|
||||
) -> Result<impl IntoResponse, (StatusCode, String)> {
|
||||
let (parts, body) = req.into_parts();
|
||||
let bytes = buffer_and_print("request", body).await?;
|
||||
|
||||
Reference in New Issue
Block a user