NAME
LWP::UserAgent::Throttled - Throttle requests to a site
VERSION
Version 0.02
SYNOPSIS
Some sites with REST APIs, such as openstreetmap.org, will blacklist you if you do too many requests.
use LWP::UserAgent::Throttled;
my $ua = LWP::UserAgent::Throttled->new();
$ua->load(5);
print $ua->get('http://www.example.com');
sleep (2);
print $ua->get('http://www.example.com'); # Will wait at least 3 seconds before the GET is sent
SUBROUTINES/METHODS
new
Creates a LWP::UserAgent::Throttled object.
send_request
See LWP::UserAgent.
load
Get/set the number of seconds between each request. The default is one second.
AUTHOR
Nigel Horne, <njh at bandsman.co.uk>
BUGS
SEE ALSO
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc LWP::Throttle
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2017 Nigel Horne.
This program is released under the following licence: GPL2