A very simple and straightforward HTTP client written in Rust.
A straightforward, non-opinionated, developer-centric HTTP client library for Rust. Built on top of hyper.
Add to your Cargo.toml:
[dependencies]
deboa = { version = "0.0.7", features = ["http1", "tokio-rt"] }
Basic usage:
use deboa::{Deboa, request::get};
use serde::Deserialize;
#[derive(Deserialize)]
struct Post {
id: u64,
title: String,
body: String,
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Deboa::new();
let posts: Vec<Post> = get("https://jsonplaceholder.typicode.com/posts")
.send_with(&client)
.await?
.body_as_json()?;
println!("First post: {}", posts[0].title);
Ok(())
}
| Crate | Description | Documentation |
|---|---|---|
| deboa | Core HTTP client library | |
| deboa-extras | Additional functionality and middleware | |
| deboa-bora | Macro for easy REST client generation | |
| deboa-macros | Procedural macros for Deboa | |
| vamo | DRY REST client wrapper | |
| vamo-macros | Macros for Vamo |
Check out the examples directory for complete examples of how to use Deboa in your projects.
This project is licensed under the MIT License.
Rogerio Pereira Araujo rogerio.araujo@gmail.com