You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use strict;
use Furl;
my $furl = Furl::HTTP->new(
agent => '',
timeout => 3,
);
my $res = $furl->get('https://en.wikipedia.org/');
die $res->status_line unless $res->is_success;
print $res->content;
Error:
Can't call method "is_success" on unblessed reference
The text was updated successfully, but these errors were encountered:
Furl::HTTP's request does not return an object, it returns a list of simple values. It's the class used inside Furl to make HTTP requests. They can look a bit similar if you've got both doc pages up.
If you're looking for an object, you probably just want Furl->new, rather than Furl::HTTP->new, otherwise if you did intend to use Furl::HTTP, this is everything it returns:
my ($protocol_minor_version, $status_code, $status_message, $response_headers, $response_body)
= $furlhttp->get('https://somesite.com');
Code:
Error:
The text was updated successfully, but these errors were encountered: