1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

upgrade to alpha3

This commit is contained in:
Nikolay Kim
2019-04-04 11:37:14 -07:00
parent fbb3dd2c40
commit 86e0f3e02c
36 changed files with 52 additions and 56 deletions

View File

@ -8,7 +8,7 @@ fn index(client: web::Data<Client>) -> impl Future<Item = HttpResponse, Error =
.get("http://127.0.0.1:8081/")
.send()
.map_err(Error::from) // <- convert SendRequestError to an Error
.and_then(|resp| {
.and_then(|mut resp| {
resp.body() // <- this is MessageBody type, resolves to complete body
.from_err() // <- convert PayloadError to an Error
.and_then(|body| {