Split response future from client::Stream (#153)

This commit is contained in:
Carl Lerche
2017-10-16 20:17:07 -07:00
committed by GitHub
parent 7c287af0d0
commit faf59f7e24
9 changed files with 121 additions and 125 deletions

View File

@@ -75,9 +75,9 @@ pub fn main() {
.body(())
.unwrap();
let stream = client.send_request(request, true).unwrap();
let (response, _) = client.send_request(request, true).unwrap();
let stream = stream.and_then(|response| {
let stream = response.and_then(|response| {
let (_, body) = response.into_parts();
body.for_each(|chunk| {