- SEE ALSO
- COPYRIGHT AND LICENSE
HTTP::Tiny::CustomRetry - Retry failed HTTP::Tiny requests
This document describes version 0.002 of HTTP::Tiny::CustomRetry (from Perl distribution HTTP-Tiny-CustomRetry), released on 2019-04-10.
use HTTP::Tiny::CustomRetry; my $res = HTTP::Tiny::CustomRetry->new( retry_strategy => 'Exponential', # required, pick a strategy (which is name of submodule under Algorithm::Backoff::*) # the following attributes are available to customize the Exponential # strategy, which are attributes from Algorithm::Backoff::Exponential with # retry_ prefix. # retry_max_attempts => ..., # retry_jitter_factor => ..., # retry_initial_delay => ..., # retry_max_delay => ..., # retry_exponent_base => ..., # retry_delay_on_success => ..., )->get("http://www.example.com/");
This class is a subclass of HTTP::Tiny that retry fail responses (a.k.a. responses with 5xx statuses; 4xx are considered the client's fault so we don't retry those).
It's a more elaborate version of HTTP::Tiny::Retry which offers a simple retry strategy: using a constant delay between attempts. HTTP::Tiny::CustomRetry uses Algorithm::Retry to offer several retry/backoff strategies.
String. Used to set default for the "retry_strategy" attribute.
retry_ATTRNAME attributes can also be set via environment HTTP_TINY_CUSTOMRETRY_ATTRNAME, for example
retry_max_attempts can be set via HTTP_TINY_CUSTOMRETRY_MAX_ATTEMPTS.
Please visit the project's homepage at https://metacpan.org/release/HTTP-Tiny-CustomRetry.
Source repository is at https://github.com/perlancar/perl-HTTP-Tiny-CustomRetry.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny-CustomRetry
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Algorithm::Retry::* strategy modules.
HTTP::Tiny::Patch::CustomRetry, patch version of this module.
This software is copyright (c) 2019 by firstname.lastname@example.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.