NAME
Net::Blossom::Response - Blossom HTTP success response object
SYNOPSIS
my $response = $client->get_blob($sha256);
say $response->status;
say $response->header('content-type');
DESCRIPTION
Net::Blossom::Response represents a successful HTTP response returned by Net::Blossom::Client.
CONSTRUCTOR
new
my $response = Net::Blossom::Response->new(%args);
Required arguments are method, url, status, and reason. status must be a three-digit HTTP status code from 100 through 599.
Optional headers defaults to an empty hash reference. Optional content defaults to the empty string.
Unknown arguments or invalid values croak.
ACCESSORS
method
Returns the HTTP method.
url
Returns the request URL.
status
Returns the HTTP status code.
reason
Returns the HTTP reason phrase.
headers
Returns the response headers hash reference.
content
Returns the response body bytes as a scalar.
METHODS
header
my $value = $response->header($name);
Returns a response header value using case-insensitive lookup. Returns undef when $name is undefined or the header is absent.