Name
SPVM::HTTP::Minimal::Message::Response - HTTP Response
Description
The HTTP::Minimal::Message::Response class of SPVM has methods to manipulate HTTP responses.
Usage
use HTTP::Minimal::Message::Response;
my $is_success = $res->is_success;
my $content = $res->content;
Fields
protocol
has protocol : ro string;
The protocol of the HTTP response.
status
has status : ro string;
The status code of the HTTP response.
reason
has reason : ro string;
The reason of the status code of the HTTP response.
Instance Methods
is_success
method is_success : int ();
If the response contains successful status code, returns 1. Otherwise returns 0.
content
method content : string ();
Returns the content body of the response.
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License