mirror of
https://github.com/actix/examples
synced 2024-11-27 16:02:57 +01:00
resolve issue 139
This commit is contained in:
parent
7373a5b1ef
commit
114056bc76
@ -15,7 +15,7 @@ path = "src/server.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-rt = "0.2"
|
actix-rt = "0.2"
|
||||||
actix-web = "1.0.0"
|
actix-web = { version = "1.0.0", features=["ssl"] }
|
||||||
|
|
||||||
env_logger = "0.5"
|
env_logger = "0.5"
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
|
@ -24,7 +24,7 @@ fn streaming(
|
|||||||
) -> impl Future<Item = HttpResponse, Error = impl Into<Error>> {
|
) -> impl Future<Item = HttpResponse, Error = impl Into<Error>> {
|
||||||
// send client request
|
// send client request
|
||||||
client
|
client
|
||||||
.get("https://www.rust-lang.org/en-US/")
|
.get("https://www.rust-lang.org/")
|
||||||
.send() // <- connect to host and send request
|
.send() // <- connect to host and send request
|
||||||
.map_err(Error::from) // <- convert SendRequestError to an Error
|
.map_err(Error::from) // <- convert SendRequestError to an Error
|
||||||
.and_then(|resp| {
|
.and_then(|resp| {
|
||||||
|
Loading…
Reference in New Issue
Block a user