surf icon indicating copy to clipboard operation
surf copied to clipboard

Retry request feature

Open xpepermint opened this issue 5 years ago • 3 comments

It would be great to have a retry mechanic included.

xpepermint avatar Apr 29 '20 20:04 xpepermint

This could probably be implemented as a middleware, using https://crates.io/crates/backoff/

zkat avatar Apr 30 '20 20:04 zkat

The correct solution here is a middleware, although that may presently be a bit challenging.

https://github.com/http-rs/surf/issues/192 proposes things related to this, namely potential middleware re-use and non-consumption of surf::Request.

Edit: I do not believe this is currently possible, see https://github.com/http-rs/surf/issues/196

Fishrock123 avatar Jul 08 '20 23:07 Fishrock123

@Fishrock123 https://github.com/ihrwein/backoff/pull/13 has now merged, so this should be achievable using something similar to the code snippets in the comments of that PR.

mchlrhw avatar Jul 14 '20 08:07 mchlrhw