mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-01 00:00:14 +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
@@ -5,9 +5,9 @@
|
||||
//! ```
|
||||
|
||||
use axum::{
|
||||
body::{Body, Bytes},
|
||||
extract::{Multipart, Path},
|
||||
http::{Request, StatusCode},
|
||||
body::Bytes,
|
||||
extract::{Multipart, Path, Request},
|
||||
http::StatusCode,
|
||||
response::{Html, Redirect},
|
||||
routing::{get, post},
|
||||
BoxError, Router,
|
||||
@@ -52,7 +52,7 @@ async fn main() {
|
||||
// POST'ing to `/file/foo.txt` will create a file called `foo.txt`.
|
||||
async fn save_request_body(
|
||||
Path(file_name): Path<String>,
|
||||
request: Request<Body>,
|
||||
request: Request,
|
||||
) -> Result<(), (StatusCode, String)> {
|
||||
stream_to_file(&file_name, request.into_body()).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user