4 stable releases
Uses new Rust 2024
| 3.0.0 | Jan 26, 2026 |
|---|---|
| 2.0.1 | Nov 3, 2025 |
| 2.0.0 | Oct 8, 2025 |
| 1.0.0 | Sep 1, 2025 |
#566 in Asynchronous
112,207 downloads per month
Used in 35 crates
(8 directly)
92KB
1K
SLoC
reqsign-http-send-reqwest
Reqwest-based HTTP client implementation for reqsign.
This crate provides ReqwestHttpSend, an HTTP client that implements the HttpSend trait from reqsign_core using the popular reqwest library.
Quick Start
use reqsign_core::Context;
use reqsign_http_send_reqwest::ReqwestHttpSend;
// Use with default configuration
let ctx = Context::new(
file_reader,
ReqwestHttpSend::default(),
);
// Or with custom client configuration
let client = reqwest::Client::builder()
.timeout(std::time::Duration::from_secs(30))
.build()
.unwrap();
let ctx = Context::new(
file_reader,
ReqwestHttpSend::new(client),
);
Features
- Full reqwest compatibility: Use all of reqwest's powerful features
- Seamless integration: Automatic conversion between
httpandreqwesttypes - Customizable: Configure timeouts, proxies, TLS settings, and more
- Async/await: Built for modern async Rust applications
Configuration Options
use reqwest::Client;
use reqsign_http_send_reqwest::ReqwestHttpSend;
let client = Client::builder()
// Timeouts
.timeout(Duration::from_secs(30))
.connect_timeout(Duration::from_secs(10))
// Connection pooling
.pool_max_idle_per_host(10)
.pool_idle_timeout(Duration::from_secs(90))
// HTTP settings
.user_agent("my-app/1.0")
.default_headers(headers)
// Proxy configuration
.proxy(reqwest::Proxy::https("https://proxy.example.com")?)
// TLS configuration
.danger_accept_invalid_certs(false)
.min_tls_version(reqwest::tls::Version::TLS_1_2)
.build()?;
let http_send = ReqwestHttpSend::new(client);
Examples
Custom Client Configuration
Check out the custom_client example to see various configuration options:
cargo run --example custom_client
Integration with Services
use reqsign_core::{Context, Signer};
use reqsign_file_read_tokio::TokioFileRead;
use reqsign_http_send_reqwest::ReqwestHttpSend;
// Create context for cloud service clients
let ctx = Context::new(
TokioFileRead::default(),
ReqwestHttpSend::default(),
);
// Use with any reqsign service
let signer = Signer::new(ctx, loader, builder);
Why reqwest?
- Mature and stable: One of the most popular HTTP clients in the Rust ecosystem
- Feature-rich: Supports proxies, cookies, redirect policies, and more
- Well-maintained: Regular updates and security patches
- Extensive ecosystem: Compatible with many Rust libraries and frameworks
License
Licensed under Apache License, Version 2.0.
Dependencies
~9–24MB
~275K SLoC