Astro-Catalog
view release on metacpan or search on metacpan
lib/Astro/Catalog/Transport/REST.pm view on Meta::CPAN
=cut
sub _fetch_url {
my $self = shift;
my $URL = shift;
# grab the user agent
my $ua = $self->useragent;
# build request
my $request = new HTTP::Request('GET', $URL);
# grab page from web
my $reply = $ua->request($request);
# Look at the result to see if it worked
if (${$reply}{"_rc"} eq 200) {
# stuff the page contents into the buffer
return ${$reply}{"_content"};
}
else {
( run in 0.367 second using v1.01-cache-2.11-cpan-de7293f3b23 )