Name
SPVM::HTTP::Tiny::Message::Response - HTTP Response
Description
The HTTP::Tiny::Message::Response class of SPVM has methods to manipulate HTTP responses.
Usage
my $response = HTTP::Tiny->new->get('http://example.com/');
my $success = $response->success;
my $status = $response->status;
my $content = $response->content;
Inheritance
Fields
protocol
has protocol : ro string;
The protocol of the HTTP response.
status
has status : ro string;
The status code of the HTTP response.
success
has success : ro byte;
The success field of the response will be true if the status code is 2XX.
reason
has reason : ro string;
The reason of the status code of the HTTP response.
Instance Methods
content
method content : string ();
Returns the content body of the response.
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License