1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

refactory response body

This commit is contained in:
Nikolay Kim
2017-10-23 23:25:32 -07:00
parent 779b480663
commit c435f16170
12 changed files with 148 additions and 51 deletions

View File

@ -17,8 +17,8 @@ fn with_param(req: &mut HttpRequest, _payload: Payload, state: &()) -> HttpRespo
HttpResponse::builder(StatusCode::OK)
.content_type("test/plain")
.body(Body::Binary(
format!("Hello {}!", req.match_info().get("name").unwrap()).into())).unwrap()
.body(format!("Hello {}!", req.match_info().get("name").unwrap()))
.unwrap()
}
fn main() {