http_extensions_retry

Last updated:

0 purchases

http_extensions_retry Image
http_extensions_retry Images
Add to Cart

Description:

http extensions retry

http_extensions : retry #
An [http extension] that retries failed requests.
Usage #
final client = ExtendedClient(
inner: Client(),
extensions: [
RetryExtension(
logger: Logger("Retry"),
defaultOptions: RetryOptions(
const RetryOptions(
retries: 3, // Number of retries before a failure
retryInterval: const Duration(seconds: 5), // Interval between each retry
retryEvaluator: (error, response) => error != null, // Evaluating if a retry is necessary regarding the error or the response. It is a good candidate for updating authentication token in case of a unauthorized error (be careful with concurrency though). error or response are at least null
)),
],
);
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.