deboa is a straightforward, non opinionated, developer-centric HTTP client library for Rust. It offers a rich array of modern features—from flexible authentication and serialization formats to runtime compatibility and middleware support—while maintaining simplicity and ease of use. It’s especially well-suited for Rust projects that require a lightweight, efficient HTTP client without sacrificing control or extensibility.
Built using hyper.
This release has a major api change. Please check the migration guide for more information. Keep in mind API for prior to 0.1.0 is subject to change. Proper deprecation will be added in the next stable release.
deboa = { version = "0.0.7", features = ["http1", "tokio-rt"] }- tokio-rt (default)
- smol-rt
- http1 (default)
- http2
use deboa::{Deboa, errors::DeboaError, request::get};
use deboa_extras::http::serde::json::JsonBody;
#[tokio::main]
async fn main() -> Result<()> {
// Create a new Deboa instance, set timeouts, catches and protocol.
let mut client = Deboa::new();
let posts: Vec<Post> = get("https://jsonplaceholder.typicode.com/posts")?
.header(header::CONTENT_TYPE, "application/json")
.send_with(&mut client)
.await?
.body_as(JsonBody)
.await?;
println!("posts: {:#?}", posts);
Ok(())
}A crate with bora macro, for easy rest client generation.
Pluggable compression/decompression, serializers and catchers.
A crate with set of convenience macros.
A crate with testing utilities.
Examples of how to use deboa.
Nice wrapper on top of deboa for dry rest client.
Vamo macros is a collection of macros to make possible use structs as resources to be sent over vamo as client.
MIT
Rogerio Pereira Araujo [email protected]