Skip to content

Instantly share code, notes, and snippets.

@kpy3
Created December 11, 2015 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kpy3/6e5e9a83af564f5ab996 to your computer and use it in GitHub Desktop.
Save kpy3/6e5e9a83af564f5ab996 to your computer and use it in GitHub Desktop.
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