fibershttpclient

fibers<em>http</em>client Documentation Build Status Code Coverage License: MIT

A tiny asynchronous HTTP/1.1 client library for Rust.

Documentation

Examples

```rust use fibers::{Executor, InPlaceExecutor, Spawn}; use fibershttpclient::connection::Oneshot; use fibershttpclient::Client; use url::Url;

let url = Url::parse("http://localhost/foo/bar").unwrap(); let mut client = Client::new(Oneshot); let future = client.request(&url).get();

let mut executor = InPlaceExecutor::new().unwrap(); let monitor = executor.spawnmonitor(future); let response = executor.runfiber(monitor).unwrap().unwrap(); println!("STATUS: {:?}", response.status_code()); println!("BODY: {:?}", response.body()); ```