Crates.io | fibers_http_client |
lib.rs | fibers_http_client |
version | 0.2.0 |
source | src |
created_at | 2018-07-24 14:37:54.320489 |
updated_at | 2023-08-18 11:58:57.064365 |
description | A tiny asynchronous HTTP/1.1 client library |
homepage | https://github.com/sile/fibers_http_client |
repository | https://github.com/sile/fibers_http_client |
max_upload_size | |
id | 75767 |
size | 49,160 |
A tiny asynchronous HTTP/1.1 client library for Rust.
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());