$ reqwest-retry
v0.9.0Retry middleware for reqwest.
Latest Update Summary
Crate
Name: reqwest-retry New version: 0.8.0 Release date: 2025-11-26T12:42:35.714920Z
Crate readme
Short description A crate implementing a wrapper around reqwest to allow for client middleware chains.
Long description The reqwest-middleware client exposes the same interface as a plain reqwest client, but ClientBuilder exposes functionality to attach middleware. This crate provides functionality for building and running middleware but no middleware implementations. Automated tests targeting wasm are disabled; however, PRs improving wasm are welcome.
Features • reqwest-retry: retry failed requests • reqwest-tracing: tracing integration, optional opentelemetry support • rustls-tls feature for secure communication • async support with Tokio
Code Examples Cargo.toml Setup
[dependencies]
reqwest = { version = "0.12", features = ["rustls-tls"] }
reqwest-middleware = "0.4"
reqwest-retry = "0.7"
reqwest-tracing = "0.5"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
Basic Usage
use reqwest_middleware::{ClientBuilder, ClientWithMiddleware};
use reqwest_retry::{RetryTransientMiddleware, policies::ExponentialBackoff};
use reqwest_tracing::TracingMiddleware;
#[tokio::main]
async fn main() {
let retry_policy = ExponentialBackoff::builder().build_with_max_retries(3);
let client = ClientBuilder::new(reqwest::Client::new())
.with(TracingMiddleware::default())
.with(RetryTransientMiddleware::new_with_policy(retry_policy))
.build();
run(client).await;
}
async fn run(client: ClientWithMiddleware) {
client
.get("https://truelayer.com")
.header("foo", "bar")
.send()
.await
.unwrap();
}
Links • https://crates.io/crates/reqwest-retry • https://crates.io/crates/reqwest-tracing • https://github.com/TrueLayer/reqwest-middleware/pull/105 • https://github.com/oxidecomputer/reqwest-conditional-middleware • https://github.com/06chaynes/http-cache • https://gitlab.com/famedly/company/backend/libraries/reqwest-cache • https://github.com/neoeinstein/aliri/tree/main/aliri_reqwest • https://crates.io/crates/http-signature-normalization-reqwest • https://github.com/tommilligan/reqwest-chain
https://api.github.com/repos/TrueLayer/reqwest-middleware/releases/211048306
Release info
Release version:
Release description
Code Examples
Minor update: 0.8.0 → 0.9.0
$ DOWNLOADS TREND
$ VERSION HISTORY
$ LINKS
$ INSTALL
cargo add reqwest-retryOr add to Cargo.toml: reqwest-retry = "0.9.0"