#client-connection #fibers #http-1 #url #tiny #oneshot

fibers_http_client

A tiny asynchronous HTTP/1.1 client library

4 releases

Uses old Rust 2015

0.2.0 Aug 18, 2023
0.1.2 Aug 14, 2018
0.1.1 Jul 31, 2018
0.1.0 Jul 24, 2018

#328 in HTTP client

39 downloads per month
Used in hb

MIT license

49KB
1K SLoC

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());

lib.rs:

A tiny asynchronous HTTP/1.1 client library.

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());

Dependencies

~4.5MB
~117K SLoC