seanmonstar / reqwest

An easy and powerful Rust HTTP Client

Home Page:https://docs.rs/reqwest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to implement different retry strategies?

groobyming opened this issue · comments

My service shares a single static reqwest client with set connection timeout, read timeout, idle time, etc. If I want to use different retry strategies for individual requests, how can I implement it? For example, request A needs to be retried 3 times, and request B needs to be retried 2 times. I checked the documentation for reqwest-retry and found that there is no way to implement this scenario.