Zahatski Aliaksandr > HTML-WebDAO > HTML::WebDAO::Response

Download:
HTML-WebDAO-0.91.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

HTML::WebDAO::Response - Response class

SYNOPSIS ^

  use HTML::WebDAO;

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

print header.return $self reference

redirect2url <url for redirect to>

Set headers for redirect to url.return $self reference

set_cookie ( -name => <name>, ...)

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

AUTHOR ^

Zahatski Aliaksandr, <zag@cpan.org>

syntax highlighting: