upgrade hyper to v0.11

This commit is contained in:
Sean McArthur
2017-06-20 21:27:59 -07:00
parent 8633060eaf
commit 665b4fe718
26 changed files with 2647 additions and 1027 deletions

16
examples/async.rs Normal file
View File

@@ -0,0 +1,16 @@
extern crate futures;
extern crate reqwest;
extern crate tokio_core;
use futures::Future;
fn main() {
let mut core = tokio_core::reactor::Core::new().unwrap();
let client = reqwest::unstable::async::Client::new(&core.handle()).unwrap();
let work = client.get("https://hyper.rs").unwrap().send().map(|res| {
println!("{}", res.status());
});
core.run(work).unwrap();
}