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

Download history 40/week @ 2024-07-22 18/week @ 2024-07-29 19/week @ 2024-08-05 15/week @ 2024-08-12 29/week @ 2024-08-19 24/week @ 2024-08-26 10/week @ 2024-09-02 9/week @ 2024-09-09 17/week @ 2024-09-16 34/week @ 2024-09-23 33/week @ 2024-09-30 43/week @ 2024-10-07 26/week @ 2024-10-14 22/week @ 2024-10-21 23/week @ 2024-10-28 9/week @ 2024-11-04

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