The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

url (-options1=>1)

from url: http://testwd.zag:82/Envs/partsh.sd?23=23 where options:

    -path_info  -> /Envs/partsh.sd
    -base       -> http://example.com:82 

defaul http://testwd.zag:82/Envs/partsh.sd?23=23

method - HTTP method

retrun HTTP method

accept

return hashref

    {
           'application/xhtml+xml' => undef,
           'application/xml' => undef,
           'text/html' => undef
      };

param - return GET and POST params

return params

body - HTTP body file descriptor ( see get-body for get content)

Return HTTP body file descriptor

    my $body;
    {
        local $/;
        my $fd = $request->body;
        $body = <$fd>;
     }

get-body - HTTP body content

Return HTTP body text

    my $body= $r->get_body;

upload - return upload content

        print Dumper $request->upload;

For command:

 curl -i -X POST -H "Content-Type: multipart/form-data"\
        -F "data=@UserSettings.txt"\
        http://example.org/Upload

output:

    {
      'data' => {
        'headers' => {
          'Content-Type' => 'text/plain',
          'Content-Disposition' => 'form-data; name="data"; filename="UserSettings.txt"'   
          },
        'tempname' => '/tmp/txBmaz5Bpf.txt',
        'size' => 6704,
        'filename' => 'UserSettings.txt',
        'name' => 'data'
      }
    };

set_header

   $cv->set_header("Content-Type" => 'text/html; charset=utf-8')

Method for output headers

    $self->response->get_request->set_header(
        'Set-Cookie',
        {
            path    => '/',
            domain  => '.example.com',
            name    => 'userid',
            value   => $self->_current_user->id,
            expires => time() + 60 * 60 * 24 * 1,    # 1 day
            secure => 1,
            httpOnly = >1

        }
    );

return hashref to {key=>value}