Skip to content

Instantly share code, notes, and snippets.

@pimeys
Created August 7, 2018 18:48
Show Gist options
  • Save pimeys/00589ce66becc7313abd62cd63537fec to your computer and use it in GitHub Desktop.
Save pimeys/00589ce66becc7313abd62cd63537fec to your computer and use it in GitHub Desktop.
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