NAME

OpenFrame::AbstractResponse - An abstract response class

SYNOPSIS

use OpenFrame::AbstractResponse;
use OpenFrame::AbstractCookie;
my $r = OpenFrame::AbstractResponse->new();
$r->setMessage("<html><body>Hello world!</body></html>");
$r->setMimeType('text/html');
$r->setMessageCode(ofOK);
$r->setCookie(OpenFrame::AbstractCookie->new());

DESCRIPTION

OpenFrame::AbstractResponse represents responses inside OpenFrame. Responses represent some kind of response following a request for information.

This module abstracts the way clients can respond with data from OpenFrame.

METHODS

new()

This method creates a new OpenFrame::AbstractResponse object. It takes no parameters.

cookie()

This method gets and sets the OpenFrame::AbstractCookie that is associated with this response.

my $cookietin = $r->getCookie();
$r->setCookie(OpenFrame::AbstractCookie->new());

message()

This method gets and sets the message string associated with this response.

my $message = $r->getMessage();
$r->setMessage("<html><body>Hello world!</body></html>");

code()

This method gets and sets the message code associated with this response. The following message codes are exported when you use OpenFrame::Constants: ofOK, ofERROR, ofREDIRECT, ofDECLINED.

my $code = $r->getMessageCode();
$r->setMessageCode(ofOK);

mimetype()

This method gets and sets the MIME type associated with this response.

my $type = $r->getMimeType();
$r->setMimeType('text/html');

AUTHOR

James Duncan <jduncan@fotango.com>