Crates.io | fibreq |
lib.rs | fibreq |
version | 0.1.8 |
source | src |
created_at | 2024-02-20 12:26:24.554977 |
updated_at | 2024-10-28 08:45:37.777276 |
description | Non-blocking HTTP client for Tarantool apps. |
homepage | |
repository | https://git.picodata.io/picodata/modules/fibreq |
max_upload_size | |
id | 1146306 |
size | 61,047 |
Fibreq is non-blocking HTTP client designed specifically for the Tarantool ecosystem, leveraging the Tarantool's fiber capabilities.
It aims to provide a robust, feature-rich alternative for making HTTP(S) requests directly from Tarantool instances,
inspired by the ease of use seen in libraries like reqwest
but tailored for Tarantool's unique environment.
Add Fibreq to your Cargo.toml
:
[dependencies]
fibreq = "0.1.0"
fn request() -> Result<(), fibreq::error::Error> {
let client = fibreq::ClientBuilder::new().build();
let response = client.get("https://google.ru").unwrap().send().unwrap();
println!("Status: {}", response.status());
if let Ok(text) = response.text() {
println!("Body: {}", text);
}
Ok(())
}