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 Context;
use ReqwestHttpSend;
// Use with default configuration
let ctx = new;
// Or with custom client configuration
let client = builder
.timeout
.build
.unwrap;
let ctx = new;
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 Client;
use ReqwestHttpSend;
let client = builder
// Timeouts
.timeout
.connect_timeout
// Connection pooling
.pool_max_idle_per_host
.pool_idle_timeout
// HTTP settings
.user_agent
.default_headers
// Proxy configuration
.proxy
// TLS configuration
.danger_accept_invalid_certs
.min_tls_version
.build?;
let http_send = new;
Examples
Custom Client Configuration
Check out the custom_client example to see various configuration options:
Integration with Services
use ;
use TokioFileRead;
use ReqwestHttpSend;
// Create context for cloud service clients
let ctx = new;
// Use with any reqsign service
let signer = new;
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.