Lemonldap::NG::Common::PSGI::Request - HTTP request object for Lemonldap::NG PSGIs
package My::PSGI; use base Lemonldap::NG::Common::PSGI; # See Lemonldap::NG::Common::PSGI ... sub handler { my ( $self, $req ) = @_; # Do something and return a PSGI response # NB: $req is a Lemonldap::NG::Common::PSGI::Request object if ( $req->accept eq 'text/plain' ) { ... } return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Body lines' ] ]; }
This package provides HTTP request objects used by Lemonldap::NG PSGIs. It contains common accessors to work with request
'Accept' header content.
'Accept-Encoding' header content.
'Accept-Language header content.
'Cookie' header content.
'Host' header content.
Client IP address.
Client TCP port.
HTTP method asked by client (GET/POST/PUT/DELETE).
SCRIPT_NAME environment variable provided by HTTP server.
Server port.
PATH_INFO content which has been subtracted `scriptname`. So it's the relative path_info for REST calls.
REQUEST_URI environment variable.
Same as `uri` but without decoding.
REMOTE_USER environment variable. It contains username when a server authentication is done.
Hash reference to be used by Lemonldap::NG::Handler::PSGI. If a server authentication is done, it contains:
{ _whatToTrace => `user()` }
GET parameters.
Content of POST requests
Set if an error occurs
Content type of posted datas.
Length of posted datas.
PSGI psgix.input.buffered variable.
PSGI psgix.input variable.
Get the content of a JSON POST request as Perl object.
http://lemonldap-ng.org/, Lemonldap::NG::Portal, Lemonldap::NG::Handler, Plack, PSGI, Lemonldap::NG::Common::PSGI, Lemonldap::NG::Common::PSGI::Router, HTML::Template,
Use OW2 system to report bug or ask for features: http://jira.ow2.org
Lemonldap::NG is available at http://forge.objectweb.org/project/showfiles.php?group_id=274
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
To install Lemonldap::NG::Common, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lemonldap::NG::Common
CPAN shell
perl -MCPAN -e shell install Lemonldap::NG::Common
For more information on module installation, please visit the detailed CPAN module installation guide.