Ease - HTTP clients for Rust Build Status

Ease is a library for interacting with RESTful APIs.

Examples

In Cargo.toml, put: toml [dependencies] ease = "*"

Make a GET request and print the result: ```rust extern crate ease;

use ease::{Url, Request};

fn main() { let url = Url::parse("http://httpbin.org/get").unwrap(); println!("{}", Request::new(url).param("foo", "bar").get().unwrap().body); } ```

Make a POST request and deserialize the response from JSON using serde: ```rust

![feature(custom_derive, plugin)]

![plugin(serde_macros)]

extern crate ease; extern crate serde; extern crate serde_json;

use std::collections::HashMap; use ease::{Url, Request};

[derive(Deserialize, Debug)]

struct PostResponse { args: HashMap, data: Option, files: Option>, form: Option>, headers: HashMap, json: Option, origin: String, url: String, }

fn main() { let url = Url::parse("http://httpbin.org/post").unwrap(); println!("{:#?}", Request::new(url).post().andthen(|res| res.jsonas::())); } ```

Documentation

Documentation is available online and can be built with cargo doc for a local copy.

License

MIT