How to implement different retry strategies? #2327
-
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. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I do not maintain or even know about reqwest-retry. However, you can clone a |
Beta Was this translation helpful? Give feedback.
I do not maintain or even know about reqwest-retry. However, you can clone a
reqwest::Client
and use it in multipletower::retry
helpers, as an example. You'd need to check the documentation on how to use it.