mirror of
https://github.com/actix/examples
synced 2025-06-28 18:00:37 +02:00
Use captured args in format string (#558)
This commit is contained in:
@ -17,8 +17,8 @@ async fn index(item: web::Json<MyObj>) -> HttpResponse {
|
||||
|
||||
/// This handler uses json extractor with limit
|
||||
async fn extract_item(item: web::Json<MyObj>, req: HttpRequest) -> HttpResponse {
|
||||
println!("request: {:?}", req);
|
||||
println!("model: {:?}", item);
|
||||
println!("request: {req:?}");
|
||||
println!("model: {item:?}");
|
||||
|
||||
HttpResponse::Ok().json(item.0) // <- send json response
|
||||
}
|
||||
|
Reference in New Issue
Block a user