8 releases
Uses old Rust 2015
0.0.8 | May 12, 2015 |
---|---|
0.0.7 | May 1, 2015 |
0.0.6 | Apr 25, 2015 |
#8 in #request-http
86 downloads per month
Used in 3 crates
(2 directly)
14KB
355 lines
Request
Documentation is available here.
Quick start
[dependencies]
request = "0.0.7"
extern crate request;
use std::collections::HashMap;
let url = "https://github.com/ghmlee";
let mut headers: HashMap<String, String> = HashMap::new();
headers.insert("Connection".to_string(), "close".to_string());
let res = match request::get(&url, &mut headers) {
Ok(res) => res,
Err(e) => { println!("{}", e); return; }
};
println!("{}", res.http_version);
println!("{}", res.status_code);
println!("{}", res.status_message);
println!("{}", res.body);
lib.rs
:
Request
Dependencies
~2.7–4MB
~87K SLoC