NAME
Twilio::Http::Response - The response to an HTTP request
SYNOPSIS
my $response = $client->request('GET', $url);
print $response->get_status_code, "\n";
my $data = $response->get_content;
METHODS
new
my $response = Twilio::Http::Response->new($status_code, $content, \%headers);
get_status_code
Returns the HTTP status code.
get_content
Returns the decoded JSON body, or nothing when the body is empty or is not JSON.
get_raw_content
Returns the body exactly as received.
get_headers
Returns a hash reference of response headers. Twilio::Http::TinyClient gives the names in lower case.
ok
Returns true when the status code is below 400.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.