mirror of
https://github.com/actix/examples
synced 2025-06-26 09:17:41 +02:00
upgrade to alpha3
This commit is contained in:
@ -15,7 +15,7 @@ path = "src/server.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
env_logger = "0.5"
|
||||
futures = "0.1"
|
||||
|
@ -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| {
|
||||
|
Reference in New Issue
Block a user