NAME
Blosxom::Plugin::Web::Response - Object representing CGI response
SYNOPSIS
use Blosxom::Plugin::Web::Response;
my $response = Blosxom::Plugin::Web::Response->new;
my $header = $response->header; # Blosxom::Header object
my $body = $response->body; # <!DOCTYPE html> ...
$response->status( 304 );
DESCRIPTION
Object representing CGI response.
METHODS
- $response = Blosxom::Plugin::Web::Response->new
-
Creates a Blosxom::Plugin::Web::Response object.
- $response->header
-
Returns a Blosxom::Header object instance.
- $response->status
-
A shortcut for
$response->header->status
. - $response->content_type
-
A shortcut for
$response->header->content_type
. -
$response->cookie( ID => 123456 ); # set my $id = $resposne->cookie( 'ID' ); # get
- $response->content_length
-
A decimal number indicating the size in bytes of the message content.
$response->content_length( 123 );
- $response->content_encoding
-
The Content-Encoding header field is used as a modifier to the media type. When present, its value indicates what additional encoding mechanism has been applied to the resource.
$response->content_encoding( 'gzip' );
- $response->location
-
Gets and sets the Location header.
- $response->redirect
-
Sets redirect URL with an optional status code, which defaults to 302.
$response->redirect( $url ); $response->redirect( $url, 301 );
- $response->body
-
Gets and sets HTTP response body.
$response->body( 'Hello World' );
SEE ALSO
Blosxom::Plugin, Plack::Response, Class::Singleton
AUTHOR
Ryo Anazawa
LICENSE AND COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.