NAME
HTTP::Tiny::Patch::Retry - Retry failed HTTP::Tiny requests
VERSION
This document describes version 0.001 of HTTP::Tiny::Patch::Retry (from Perl distribution HTTP-Tiny-Patch-Retry), released on 2018-10-06.
SYNOPSIS
From Perl:
use HTTP::Tiny::Patch::Retry
# -retries => 4, # optional, default is 3
# -delay => 5, # optional, default is 2
;
my $res = HTTP::Tiny->new->get("http://www.example.com/");
DESCRIPTION
This module patches HTTP::Tiny to retry fail responses (a.k.a. responses with 5xx statuses; 4xx are considered the client's fault so we don't retry those).
CONFIGURATION
-retries
Int, default 3. Maximum number of consecutive retries for a request. 0 will disable retrying.
-delay
Int, default 2. Number of seconds to wait between retries.
FAQ
ENVIRONMENT
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/HTTP-Tiny-Patch-Retry.
SOURCE
Source repository is at https://github.com/perlancar/perl-HTTP-Tiny-Patch-Retry.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny-Patch-Retry
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.
SEE ALSO
HTTP::Retry wraps HTTP::Tiny and offers the same feature, but you have to use a new interface.
HTTP::Tiny::Patch::Cache which can be combined with this patch to give both retry and caching ability.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 by perlancar@cpan.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.