NAME
Blosxom::Plugin::Web::Request - Object representing CGI request
SYNOPSIS
use Blosxom::Plugin::Web::Request;
my $request = Blosxom::Plugin::Web::Request->new;
my $method = $request->method; # GET
my $page = $request->param( 'page' ); # 12
my $id = $request->cookie( 'ID' ); # 123456
DESCRIPTION
Object representing CGI request.
METHODS
- $request = Blosxom::Plugin::Web::Request->new
-
Create a Blosxom::Plugin::Web::Request object.
- $request->base
-
Not implemented yet.
- $request->path_info
-
Not implemented yet.
-
my $id = $request->cookie( 'ID' ); # 123456
- $request->param
-
my $value = $request->param( 'foo' ); my @values = $request->param( 'foo' ); my @fields = $request->param;
- $request->method
-
Returns the method used to access your script, usually one of
POST
,GET
orHEAD
. - $request->content_type
-
Returns the content_type of data submitted in a POST, generally
multipart/form-data
orapplication/x-www-form-urlencoded
. - $request->referer
-
Returns the URL of the page the browser was viewing prior to fetching your script. Not available for all browsers.
- $request->remote_host
-
Returns either the remote host name, or IP address if the former is unavailable.
- $request->user_agent
-
Returns the
HTTP_USER_AGENT
variable. If you give this method a single argument, it will attempt to pattern match on it, allowing you to do something like:if ( $request->user_agent('Mozilla') ) { ... }
- $request->address
-
Returns the remote host IP address, or
127.0.0.1
if the address is unavailable (REMOTE_ADDR
). - $request->user
-
Returns the authorization/verification name for user verification, if this script is protected (
REMOTE_USER
). - $request->protocol
-
Returns the protocol (HTTP/1.0 or HTTP/1.1) used for the current request.
- $request->upload
-
Returns Blosxom::Plugin::Web::Request::Upload objects.
my $upload = $request->upload( 'field' ); my @uploads = $request->upload( 'field' ); my @fields = $request->upload;
- $request->is_secure
-
Returns a Boolean value telling whether connection is secure.
- $request->header
-
Returns the value of the specified header.
my $requested_language = $request->header( 'Accept-Language' );
SEE ALSO
Blosxom::Plugin, Plack::Request
AUTHOR
Ryo Anazawa
LICENSE AND COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.