| Crates.io | deboa |
| lib.rs | deboa |
| version | 0.0.5-beta.2 |
| created_at | 2025-02-13 13:45:14.58988+00 |
| updated_at | 2025-09-24 10:40:23.80523+00 |
| description | A friendly rest client on top of hyper. |
| homepage | https://github.com/ararog/deboa |
| repository | https://github.com/ararog/deboa |
| max_upload_size | |
| id | 1554229 |
| size | 160,209 |
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.
This release has a major api change. Please check the migration guide for more information.
deboa = { version = "0.0.5-alpha.3", features = ["http1", "tokio-rt"] }
use deboa::{Deboa, request::get};
use deboa_extras::http::serde::json::JsonBody;
#[tokio::main]
async fn main() -> Result<(), DeboaError> {
let client = Deboa::new();
/*
You can also use the Fetch trait to issue requests
let posts: Vec<Post> = "https://jsonplaceholder.typicode.com/posts"
.fetch(client)
.await?
.body_as(JsonBody)?;
or use at, from (defaults to GET) and to (defaults to POST) methods:
let posts: Vec<Post> = at("https://jsonplaceholder.typicode.com/posts", http::Method::GET)?
.go(client)
.await?
.body_as(JsonBody)?;
shifleft? Yes sir! Defaults to GET, but you can change it, same for headers.
let request = client << "https://jsonplaceholder.typicode.com/posts";
let posts: Vec<Post> = client.execute(request)
.await?
.body_as(JsonBody)?;
*/
let posts: Vec<Post> = get("https://jsonplaceholder.typicode.com/posts")?
.go(client)
.await?
.body_as(JsonBody)?;
println!("posts: {:#?}", posts);
Ok(())
}
MIT
Rogerio Pereira Araujo rogerio.araujo@gmail.com