/fibers_http_client

A HTTP/1.1 client library for Rust

Primary LanguageRustMIT LicenseMIT

fibers_http_client

fibers_http_client Documentation License: MIT

A tiny asynchronous HTTP/1.1 client library for Rust.

Documentation

Examples

use fibers_http_client::connection::Oneshot;
use fibers_http_client::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 response = fibers_global::execute(future).unwrap();
println!("STATUS: {:?}", response.status_code());
println!("BODY: {:?}", response.body());