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
retrun HTTP method
return hashref
{ 'application/xhtml+xml' => undef, 'application/xml' => undef, 'text/html' => undef };
return params
Return HTTP body file descriptor
my $body; { local $/; my $fd = $request->body; $body = <$fd>; }
Return HTTP body text
my $body= $r->get_body;
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' } };
$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}
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.