feat(http): allow specifying custom body streams

This commit is contained in:
Sean McArthur
2017-02-16 12:39:50 -08:00
parent 2266d869ca
commit 1b1311a7d3
11 changed files with 384 additions and 276 deletions

View File

@@ -60,7 +60,7 @@ fn post_one_at_a_time(b: &mut test::Bencher) {
req.headers_mut().set(ContentLength(post.len() as u64));
req.set_body(post);
let work = client.get(url.clone()).and_then(|res| {
let work = client.request(req).and_then(|res| {
res.body().for_each(|_chunk| {
Ok(())
})