WebDAO::Response - Response class
new WebDAO::Response:: cv => $cv
Class for make HTTP response
Return ref to request object (WebDAO::CV)
set response HTTP status
$r->set_status(200)
return $self
$self
Set out header:
$response->set_header('Location', $redirect_url); $response->set_header( 'Content-Type' => 'text/html; charset=utf-8' );
return $self reference
return value for header NAME:
$r->content_type('text/html; charset=utf-8');
A decimal number indicating the size in bytes of the message content.
Determine mime type for filename (Simple by ext); return str
print header.return $self reference
Set headers for redirect to url.return $self reference
Set cookie. return $self reference
Set callbacks for call after flush
Prepare headers and save
$respose->send_file($filename, -type=>'image/jpeg');
Flush current state of response.
Set modal mode for answer
Set HTTP 404 headers
Return expected output format: defauilt html
# return string for format $r->wantformat()
Check if desired format is expected
#$r->wantformat('html') return boolean if ($r->wantformat('html')) { # }
Force set desired format:
$r->wantformat('html'=>1); #return $response object ref
Method for detect output format when wantformat() called
wantformat()
Must return :
string - output format, i.e. 'html', 'xml' undef - unknown ( use defaults )
Set flag for empty response. Headers are not printed. return $self
Check is response cleared. Return 1|0
http://webdao.sourceforge.net
Zahatski Aliaksandr, <zag@cpan.org>
Copyright 2002-2012 by Zahatski Aliaksandr
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WebDAO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebDAO
CPAN shell
perl -MCPAN -e shell install WebDAO
For more information on module installation, please visit the detailed CPAN module installation guide.