Something
public text v1 · immutablesub http_get {
my $url = shift() || die('http_get() missing argument');
debug("HTTP GET: $url");
my $req = HTTP::Request->new(GET => $url);
$req->header(Accept => "text/html, */*;q=0.1");
my $res = $ua->request($req);
debug("HTTP GET Request sent");
# Check the outcome of the response
if ($res->is_success) {
# http_print_result($res->content);
return $res->content;
}
return $res->status_line;
}