NAME

WebDAO::Response - Response class

DESCRIPTION

Class for set response headers

METHODS

set_header NAME, VALUE

Set out header:

$response->set_header('Location', $redirect_url);
$response->set_header( -type => 'text/html; charset=utf-8' );

return $self reference

get_header NAME

return value for header NAME:

get_mime_for_filename <filename>

Determine mime type for filename (Simple by ext); return str

print header.return $self reference

redirect2url <url for redirect to>

Set headers for redirect to url.return $self reference

Set cookie. For params see manpage for CGI::cookie. return $self reference

set_callback(sub1{}[, sub2{} ..])

Set callbacks for call after flush

send_file <filename>|<file_handle>|<reference to GLOB> [, -type=><MIME type string>]

Prepare headers and save

$respose->send_file($filename, -type=>'image/jpeg');

flush

Flush current state of response.

error404

Set HTTP 404 headers

SEE ALSO

http://webdao.sourceforge.net

AUTHOR

Zahatski Aliaksandr, <zag@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2002-2010 by Zahatski Aliaksandr

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.