mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
Return the HTTP headers as well in an array context.
This commit is contained in:
parent
306d1d615f
commit
8ee8ff9e8b
@ -57,9 +57,11 @@ sub get {
|
||||
my($app, $uri) = @_;
|
||||
my $request = HTTP::Request->new('GET', $uri);
|
||||
my $response = $self->ua->request($request);
|
||||
# XXX no error handling
|
||||
# XXX headers are not returned
|
||||
return $response->content;
|
||||
if (wantarray) {
|
||||
return ($response->content, $response);
|
||||
} else {
|
||||
return $response->content;
|
||||
}
|
||||
}
|
||||
|
||||
sub unescapeHTML {
|
||||
|
Loading…
x
Reference in New Issue
Block a user