1 unstable release
Uses new Rust 2024
new 0.1.0 | Apr 8, 2025 |
---|
#391 in HTTP client
103 downloads per month
17KB
227 lines
HTTP Client Utilities for Rust
A lightweight, high-level HTTP client library for Rust with convenient utilities for common operations.
Features
- Simple API for making HTTP requests (GET, POST, etc.)
- Support for query parameters and headers
- File downloads with progress reporting
- Resumable downloads (supporting Range requests)
- Automatic JSON serialization/deserialization
- Configurable timeouts
- Thread-safe design
Installation
Add this to your Cargo.toml
:
[dependencies]
http-client-utils = "0.1"
use http_client_utils::HttpClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = HttpClient::new();
// GET request
let response = client.get("https://httpbin.org/get").await?;
println!("Status: {}", response.status());
// POST request with JSON
let response = client.post(
"https://httpbin.org/post",
&serde_json::json!({"key": "value"})
).await?;
Ok(())
}
Dependencies
~7–19MB
~264K SLoC