mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 18:09:22 +02:00
pass request as value
This commit is contained in:
@ -31,7 +31,7 @@ fn index(req: HttpRequest) -> Box<Future<Item=HttpResponse, Error=Error>> {
|
||||
}
|
||||
|
||||
/// This handler uses `With` helper for loading serde json object.
|
||||
fn extract_item(_: &HttpRequest, item: Json<MyObj>) -> Result<HttpResponse> {
|
||||
fn extract_item(_: HttpRequest, item: Json<MyObj>) -> Result<HttpResponse> {
|
||||
println!("model: {:?}", &item);
|
||||
httpcodes::HTTPOk.build().json(item.0) // <- send response
|
||||
}
|
||||
|
Reference in New Issue
Block a user