Eve::HttpRequest::Psgi - an HTTP request adapter for the PSGI interface.
use Eve::HttpRequest::Psgi; my $request = Eve::HttpRequest->new( uri_constructor => sub { return Eve::Uri->new(@_); }, env_hash => $env_hash); my $uri = $request->get_uri(); my $method = $request->get_method(); my $param = $request->get_parameter(name => 'some_parameter'); my @param_list = $request->get_parameter(name => 'some_list'); my $cookie = $request->get_cookie(name => 'some_cookie'); my $upload_hash = $request->get_upload(name => 'huge_file');
The class adapts some functionality of the Plack::Request module.
Plack::Request
uri_constructor
a code reference returning a newly constructed URI
env_hash
an environment hash that is supplied to an application by a PSGI handler.
Returns an URI instance built from an HTTP request URI.
Returns an HTTP method name.
Returns a request parameter value or a list of values for a specified parameter name. When called in a scalar context, will return a single value, which for a multivalue parameter will result in a first value of the list:
my $parameter_value = $request->get_parameter(name => 'some');
To receive a list of all values for a multivalue parameter, call the method in a list context:
my @parameter_value_list = $request->get_parameter(name => 'some');
name
Returns a hash containing information about an uploaded file. This hash will have tempname, size and filename keys, values for which represent the temporary file path, its size in bytes and the original name of the file.
tempname
size
filename
Returns a hash reference with the requested parameter values.
Returns a request cookie value for a specified name.
CGI
Eve::Class
Eve::Uri
Copyright 2012 Igor Zinovyev.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
1 POD Error
The following errors were encountered while parsing the POD:
=over without closing =back
To install Eve, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eve
CPAN shell
perl -MCPAN -e shell install Eve
For more information on module installation, please visit the detailed CPAN module installation guide.