Created
May 14, 2015 05:30
-
-
Save marcmo/31b09a73e3f42227b391 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 hyper::Client; | |
use hyper::header::HeaderFormat; | |
fn main() { | |
let mut client = Client::new(); | |
let mut res = client.head("http://example.org/") | |
.send().unwrap(); | |
println!("StatusCode: {}", res.status); | |
println!("contenttype: {}", res.headers.get::<HeaderFormat::ContentType>()); | |
// println!("contenttype: {}", res.headers.get_raw("Content-Type").unwrap()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment