Deboa
deboa (“fine” portuguese slang) 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 on top of hyper.
Features
- easily add, remove and update headers
- helpers to add basic and bearer auth
- set retries and timeout
- pluggable catchers (interceptors)
- pluggable compression (gzip, deflate, brotli)
- pluggable serialization (json, xml, msgpack, yaml, fory and cbor)
- cookies support
- urlencoded and multipart forms
- comprehensive error handling
- response streaming
- upgrade support (websocket, etc.)
- runtime compatibility (tokio and smol)
- http1/2/3 support
Benchmark Results
As of the latest benchmark run, Deboa demonstrates competitive performance compared to Reqwest.
Get Request
Deboa |
Reqwest |
|
|---|---|---|
100 |
46.37 ms (✅ 1.00x) |
48.67 ms (✅ 1.05x slower) |
500 |
46.47 ms (✅ 1.00x) |
47.32 ms (✅ 1.02x slower) |
1000 |
46.36 ms (✅ 1.00x) |
47.34 ms (✅ 1.02x slower) |
Quick Start
Add to your Cargo.toml:
[dependencies]
deboa = { version = "0.0.9" }
Basic usage:
use deboa::{Client, request::get, Result};
use deboa_extras::http::serde::json::JsonBody;
use serde::Deserialize;
#[derive(Deserialize)]
struct Post {
id: u64,
title: String,
body: String,
}
#[tokio::main]
async fn main() -> Result<()> {
let client = Client::new();
let posts: Vec<Post> = get("https://jsonplaceholder.typicode.com/posts")
.send_with(&client)
.await?
.body_as(JsonBody, Post)?;
println!("First post: {}", posts[0].title);
Ok(())
}
Crates
| Crate | Description | Documentation |
|---|---|---|
| deboa | Core HTTP client library | |
| deboa-extras | Additional functionality and middleware | |
| deboa-fory | Apache Fory support for Deboa | |
| deboa-macros | Procedural macros for Deboa | |
| vamo | DRY REST client wrapper | |
| vamo-macros | Macros for Vamo |
Examples
Check out the examples for complete examples of how to use Deboa in your projects.
Create project from template
You can create a new project from the template using cargo generate:
cargo generate ararog/deboa-templates
Documentation
License
This project is licensed under the MIT License.
Author
Rogerio Pereira Araujo rogerio.araujo@gmail.com