8 releases

Uses old Rust 2015

0.0.8 May 12, 2015
0.0.7 May 1, 2015
0.0.6 Apr 25, 2015

#10 in #request-http

Download history 30/week @ 2024-04-19 30/week @ 2024-04-26 26/week @ 2024-05-03 37/week @ 2024-05-10 34/week @ 2024-05-17 38/week @ 2024-05-24 40/week @ 2024-05-31 24/week @ 2024-06-07 34/week @ 2024-06-14 37/week @ 2024-06-21 20/week @ 2024-06-28 8/week @ 2024-07-05 22/week @ 2024-07-12 28/week @ 2024-07-19 31/week @ 2024-07-26 10/week @ 2024-08-02

94 downloads per month
Used in 3 crates (2 directly)

Apache-2.0

14KB
355 lines

Request

Build Status

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
~86K SLoC