1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 02:19:22 +02:00
This commit is contained in:
Nikolay Kim
2017-10-06 23:14:13 -07:00
parent 0b5f0c4f22
commit a505be9321
13 changed files with 106 additions and 65 deletions

View File

@ -21,13 +21,13 @@ impl Route for MyRoute {
fn request(req: HttpRequest,
payload: Option<Payload>,
ctx: &mut HttpContext<Self>) -> HttpResponse<Self>
ctx: &mut HttpContext<Self>) -> HttpMessage<Self>
{
if let Some(pl) = payload {
ctx.add_stream(pl);
HttpResponse::Stream(MyRoute{req: Some(req)})
HttpMessage::Stream(MyRoute{req: Some(req)})
} else {
HttpResponse::Reply(req, httpcodes::HTTPOk)
HttpMessage::Reply(req, httpcodes::HTTPOk)
}
}
}