Created
December 11, 2015 08:10
-
-
Save kpy3/6e5e9a83af564f5ab996 to your computer and use it in GitHub Desktop.
This file contains 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
extern crate hyper; | |
use std::io; | |
use hyper::Client; | |
use hyper::header::Connection; | |
#[test] | |
fn it_works() { | |
let client = Client::new(); | |
let mut res = client.get("http://google.com").header(Connection::close()).send().unwrap(); | |
io::copy(&mut res, &mut io::stdout()).unwrap(); | |
assert_eq!(res.status, hyper::Ok); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment