NAME
Curse::Message::Response - HTTP Responses
SYNOPSIS
use Curse::Message::Response;
my $res = Curse::Message::Response->new;
$res->code(200);
$res->headers->content_type('text/plain');
$res->body('Hello World!');
print "$res";
$res->parse('HTTP/1.1 200 OK');
DESCRIPTION
Curse::Message::Response is a generic container for HTTP responses.
ATTRIBUTES
Curse::Message::Response inherits all attributes from Curse::Message and implements the following new ones.
code
my $code = $res->code;
$res = $res->code(200);
message
my $message = $res->message;
$res = $res->message('OK');
METHODS
Curse::Message::Response inherits all methods from Curse::Message and implements the following new ones.
build_start_line
my $string = $res->build_start_line;
cookies
my @cookies = $res->cookies;
$res = $res->cookies(Curse::Cookie::Response->new);
default_message
my $message = $res->default_message;
fix_headers
$res = $res->fix_headers;
parse
$res = $res->parse('HTTP/1.1 200 OK');