4 releases

0.2.0 Jan 5, 2025
0.1.2 Jan 6, 2024
0.1.1 Aug 7, 2022
0.1.0 Aug 7, 2022

#251 in HTTP client

Download history 32/week @ 2024-09-27 7/week @ 2024-10-04 9/week @ 2024-10-11 55/week @ 2024-10-18 26/week @ 2024-10-25 13/week @ 2024-11-01 1/week @ 2024-11-08 2/week @ 2024-11-15 7/week @ 2024-11-22 4/week @ 2024-11-29 38/week @ 2024-12-06 26/week @ 2024-12-13 4/week @ 2024-12-20 3/week @ 2024-12-27 148/week @ 2025-01-03 61/week @ 2025-01-10

219 downloads per month
Used in gha-toolkit

MIT license

12KB
197 lines

reqwest-retry-after

Crates.io docs.rs Crates.io

reqwest-retry-after is a library that adds support for the Retry-After header in reqwest, using reqwest_middleware.

Usage

Pass RetryAfterMiddleware to the ClientWithMiddleware builder.

use reqwest_middleware::{ClientBuilder, ClientWithMiddleware};
use reqwest_retry_after::RetryAfterMiddleware;

let client = ClientBuilder::new(reqwest::Client::new())
    .with(RetryAfterMiddleware::new())
    .build();

lib.rs:

reqwest-retry-after

reqwest-retry-after is a library that adds support for the Retry-After header in reqwest, using reqwest_middleware.

Usage

Pass RetryAfterMiddleware to the ClientWithMiddleware builder.

use reqwest_middleware::{ClientBuilder, ClientWithMiddleware};
use reqwest_retry_after::RetryAfterMiddleware;

let client = ClientBuilder::new(reqwest::Client::new())
    .with(RetryAfterMiddleware::new())
    .build();

Dependencies

~7–18MB
~232K SLoC