$ reqwest-retry

v0.9.0

Retry middleware for reqwest.

Downloads: 27.5M
Recent: 4.6M
Versions: 18
Updated: January 7, 2026

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();
}

Linkshttps://crates.io/crates/reqwest-retryhttps://crates.io/crates/reqwest-tracinghttps://github.com/TrueLayer/reqwest-middleware/pull/105https://github.com/oxidecomputer/reqwest-conditional-middlewarehttps://github.com/06chaynes/http-cachehttps://gitlab.com/famedly/company/backend/libraries/reqwest-cachehttps://github.com/neoeinstein/aliri/tree/main/aliri_reqwesthttps://crates.io/crates/http-signature-normalization-reqwesthttps://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

22.9M27.5M

$ VERSION HISTORY

v0.9.0January 7, 2026
v0.8.0November 26, 2025
v0.7.0November 11, 2024

$ LINKS

$ INSTALL

cargo add reqwest-retry

Or add to Cargo.toml: reqwest-retry = "0.9.0"