Skip to the content.

Deboa

crates.io Build Status Documentation License: MIT

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

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" }
deboa-tokio = { version = "0.1.0-beta.2" }

Basic usage:

use deboa::{
    request::{DeboaRequest, FetchWith, get},
    Result,
};
use deboa_tokio::Client;
use deboa_extras::http::{self, serde::json::JsonBody};

#[tokio::main]
async fn main() -> Result<()> {
  // Create a new Client instance, set timeouts, catches and protocol.
  let client = Client::new();

  let posts: Vec<Post> = get("https://jsonplaceholder.typicode.com/posts")?
    .header(header::CONTENT_TYPE, "application/json")
    .send_with(&client)
    .await?
    .body_as(JsonBody)
    .await?;

  println!("posts: {:#?}", posts);

  Ok(())
}

Crates

Crate Description Documentation
deboa Core HTTP client library docs.rs
deboa-smol Smol runtime support for Deboa docs.rs
deboa-tokio Tokio runtime support for Deboa docs.rs
deboa-extras Additional functionality and middleware docs.rs
deboa-fory Apache Fory support for Deboa docs.rs
deboa-macros Procedural macros for Deboa docs.rs
vamo DRY REST client wrapper docs.rs
vamo-macros Macros for Vamo docs.rs

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

Other Projects

License

Licensed under either of

at your option.

Author

Rogerio Pereira Araujo rogerio.araujo@gmail.com