Created
August 7, 2018 18:48
-
-
Save pimeys/00589ce66becc7313abd62cd63537fec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let work = client | |
.request(request) | |
.and_then(move |response| { | |
let (parts, body) = response.into_parts(); | |
body | |
.concat2() | |
.map(move |chunk| { | |
println!("{:?}", parts) | |
}) | |
}); | |
let mut core = CurrentThread::new(); | |
let result = core.block_on(work); | |
println!("RES: {:?}", result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment