Uses old Rust 2015

0.1.2 Jul 17, 2016
0.1.1 Jul 16, 2016
0.1.0 Jul 15, 2016

#17 in #failed

MIT/Apache

8KB
153 lines

reru

A simple HTTP request client for Rust, inspired by unirest.

let mut res = String::new();

reru::post("https://httpbin.org/post")
    .expect("failed to parse URL")
    .param("show_env", "1")
    .body_json(&["", "Ferris"])
    .expect("failed to serialize")
    .request()
    .expect("failed to send request")
    .read_to_string(&mut res)
    .expect("failed to read response");

println!("{}", res);

lib.rs:

A simple HTTP request client library.

#Example

let mut res = String::new();

reru::post("https://httpbin.org/post")
    .expect("failed to parse URL")
    .param("show_env", "1")
    .body_json(&["", "Ferris"])
    .expect("failed to serialize")
    .request()
    .expect("failed to send request")
    .read_to_string(&mut res)
    .expect("failed to read response");

println!("{}", res);

Dependencies

~5.5MB
~133K SLoC