Furl::Response - Response object for Furl
my $res = Furl::Response->new($minor_version, $code, $message, $headers, $content); print $res->status, "\n";
This is a HTTP response object in Furl.
my $res = Furl::Response->new($minor_version, $code, $msg, \%headers, $content);
Returns HTTP status code.
Returns HTTP status message.
Returns instance of Furl::Headers
Returns response body in scalar.
This will return the content after any Content-Encoding and charsets have been decoded. See HTTP::Message for details
Content-Encoding
Returns instance of Furl::Request related this response.
Shorthand to access Furl::Headers.
$res->protocol(); # => "HTTP/1.1"
Returns HTTP protocol in string.
Make instance of HTTP::Response from Furl::Response.
Convert object to PSGI response. It's very useful to make proxy.
Convert response object to HashRef.
Format is following:
code: Int message: Str protocol: Str headers: ArrayRef[Str] content: Str
Returns true if status code is 2xx.
$res->status_line() # => "200 OK"
Returns status line.
Captured request headers in raw string.
This method is only for debugging.
You can use this method if you are using capture_request parameter is true.
capture_request
Captured request content in raw string.
To install Furl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Furl
CPAN shell
perl -MCPAN -e shell install Furl
For more information on module installation, please visit the detailed CPAN module installation guide.