Registry / http-client / reqwest-retry

reqwest-retry

JSON →
library0.9.1rscratesunverified

Retry middleware for reqwest, enabling automatic retries of failed HTTP requests.

# Cargo.toml [dependencies] reqwest-retry = "0.9.1"
INSTALL
IMPORT
SIG · REQWEST-RETRY
R
reqwest-retry
http-clientrustv0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ClientWithMiddleware
use reqwest_middleware::ClientWithMiddleware;

Creates a reqwest client with retry middleware using exponential backoff.

use reqwest_middleware::ClientBuilder; use reqwest_retry::{RetryTransientMiddleware, policies::ExponentialBackoff}; let retry_policy = ExponentialBackoff::builder().build_with_max_retries(3); let client = ClientBuilder::new(reqwest::Client::new()) .with(RetryTransientMiddleware::new_with_policy(retry_policy)) .build(); let response = client.get("https://example.com").send().await.unwrap();
Debug
Known issues
gotchaRequires reqwest-middleware crate as a dependency
fix
Add reqwest-middleware to Cargo.toml
affects: >=0.1.0
Upgrade
Version history
0.9.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
22
Amazon
1
Resources
reqwest-retry — cargo add reqwest-retry · libregistry