Changed: | ||||||||
< < | Package = | |||||||
> > | Package =TWiki::Request | |||||||
Deleted: | ||||||||
< < | On this page:
package TWiki::Request | |||||||
Class to encapsulate request data.
Fields:
| ||||||||
Added: | ||||||||
> > |
On this page:
| |||||||
ClassMethod new ([$initializer])Constructs a TWiki::Request object.
ObjectMethod action () -> $actionGets/Sets action requested (view, edit, save, ...)ObjectMethod method ([$method]) -> $methodDEPRECATED. Sets/Gets request method (GET, HEAD, POST). Same as request_method() method.ObjectMethod request_method ([$method]) -> $methodSets/Gets request method (GET, HEAD, POST).ObjectMethod pathInfo ([$path]) -> $pathSets/Gets request path info. Called without parameters returns current pathInfo. There is apath_info() alias for compatibility with CGI.
ObjectMethod protocol () -> $protocolReturns 'https' if secure connection. 'http' otherwise.ObjectMethod uri ([$uri]) -> $uriGets/Sets request uri.ObjectMethod queryString () -> $query_stringReturns query_string part of request uri, if any.query_string() alias provided for compatibility with CGI.
ObjectMethod url ([-full=>1,-base => 1, -absolute => 1, -relative => 1, -path => 1, -query => 1] ) -> $url Returns many url info.
ObjectMethod secure ([$secure]) -> $secureGets/Sets connection's secure flag.ObjectMethod remoteAddress ([$ip]) -> $ipGets/Sets client IP address.remote_addr() alias for compatibility with CGI.
ObjectMethod remoteUser ([$userName]) -> $userNameGets/Sets remote user's name.remote_user() alias for compatibility with CGI.
ObjectMethod serverPort ([$userName]) -> $userNameGets/Sets server user's name.server_port() alias for compatibility with CGI.
ObjectMethod queryParam ([-name=>$name,-value=>$value|-name => $name, -values => [ $v1, $v2, ... ] | $name, $v1, $v2, ... | name, [ $v1, $v2, ... ] ] ) -> @paramNames | @values | $firstValue This methos is used by engines, during its prepare phase. Should not be used anywhere else. Since bodyParam must exist and it has different semantics from param method, this one exists for symmetry, and could be modified in the future, so it could be possible to get query and body parameters independently.ObjectMethod bodyParam ([-name=>$name,-value=>$value|-name => $name, -values => [ $v1, $v2, ... ] | $name, $v1, $v2, ... | name, [ $v1, $v2, ... ] ] ) -> @paramNames | @values | $firstValue Adds parameters passed within request body. It keeps previous values, but places new ones first. Should be called only by engines. Otherwise use param() method.ObjectMethod param ([-name=>$name,-value=>$value|-name => $name, -values => [ $v1, $v2, ... ] | $name, $v1, $v2, ... | name, [ $v1, $v2, ... ] ] ) -> @paramNames | @values | $firstValue
ObjectMethod cookie ($name[,$value,$path,$secure,$expires]) -> $value
@paramNam"> ObjectMethod delete (@paramNames)Deletes parameters from request.Delete() alias provided for compatibility with CGI
ObjectMethod deleteAll ()Deletes all parameter name and value(s).delete_all() alias provided for compatibility with CGI.
ObjectMethod header ([-name=>$name,-value=>$value|-name => $name, -values => [ $v1, $v2, ... ] | $name, $v1, $v2, ... | name, [ $v1, $v2, ... ] ] ) -> @paramNames | @values | $firstValue Gets/Sets a header field:
http method. %ENV is not available and must be replaced
by calls to this and other methods of this class. http is
provided for compatibility, but is deprecated. Use this one
instead.
Calls to CGI header method must be replaced by calls to
TWiki::Response header method.
ObjectMethod save ($fh)Saves object state to filehandle. Object may be loaded latter passing $fh to new constructor or by calling load().ObjectMethod load ($fh)Loads object state from filehandle, probably created with a previous save().ObjectMethod upload ($name) -> $handleCalled with file name parameter returns an open filehandle to uploaded file.
ObjectMethod uploadInfo ($fname) -> $headersReturns a hashref to information about uploaded files as sent by browser.ObjectMethod tmpFileName ($fname) -> $tmpFileNameReturns the name of temporarly created file to store uploaded $fname. $fname may be obtained by callingparam() with form field name.
ObjectMethod uploads ([\%uploads]) -> $hashrefGets/Sets request uploads field. Keys are uploaded file names, as sent by browser, and values are TWiki::Request::Upload objects.ObjectMethod http ([$header]) -> $valueDEPRECATEDCalled without parameters returns a list of all available header filed names. Given a field name returns value associated. http('HTTP_USER_AGENT'); http('User-Agent') and http('User_Agent') are equivalent. Please, useheader() instead. Present only for compatibility with CGI.
ObjectMethod https ([$name]) -> $value||$secureDEPRECATEDSimilar tohttp() method above. Called with no parameters returns
secure flag.
Please, use header() and secure() instead.
Present only for compatibility with CGI.
ObjectMethod userAgent () -> $userAgent;Convenience method to get User-Agent string.user_agent() alias provided for compatibility with CGI.
ObjectMethod referer ()Convenience method to get Referer uri. |
Package =On this page:
package TWiki::RequestClass to encapsulate request data. Fields:
ClassMethod new ([$initializer])Constructs a TWiki::Request object.
ObjectMethod action () -> $actionGets/Sets action requested (view, edit, save, ...)ObjectMethod method ([$method]) -> $methodDEPRECATED. Sets/Gets request method (GET, HEAD, POST). Same as request_method() method.ObjectMethod request_method ([$method]) -> $methodSets/Gets request method (GET, HEAD, POST).ObjectMethod pathInfo ([$path]) -> $pathSets/Gets request path info. Called without parameters returns current pathInfo. There is apath_info() alias for compatibility with CGI.
ObjectMethod protocol () -> $protocolReturns 'https' if secure connection. 'http' otherwise.ObjectMethod uri ([$uri]) -> $uriGets/Sets request uri.ObjectMethod queryString () -> $query_stringReturns query_string part of request uri, if any.query_string() alias provided for compatibility with CGI.
ObjectMethod url ([-full=>1,-base => 1, -absolute => 1, -relative => 1, -path => 1, -query => 1] ) -> $url Returns many url info.
ObjectMethod secure ([$secure]) -> $secureGets/Sets connection's secure flag.ObjectMethod remoteAddress ([$ip]) -> $ipGets/Sets client IP address.remote_addr() alias for compatibility with CGI.
ObjectMethod remoteUser ([$userName]) -> $userNameGets/Sets remote user's name.remote_user() alias for compatibility with CGI.
ObjectMethod serverPort ([$userName]) -> $userNameGets/Sets server user's name.server_port() alias for compatibility with CGI.
ObjectMethod queryParam ([-name=>$name,-value=>$value|-name => $name, -values => [ $v1, $v2, ... ] | $name, $v1, $v2, ... | name, [ $v1, $v2, ... ] ] ) -> @paramNames | @values | $firstValue This methos is used by engines, during its prepare phase. Should not be used anywhere else. Since bodyParam must exist and it has different semantics from param method, this one exists for symmetry, and could be modified in the future, so it could be possible to get query and body parameters independently.ObjectMethod bodyParam ([-name=>$name,-value=>$value|-name => $name, -values => [ $v1, $v2, ... ] | $name, $v1, $v2, ... | name, [ $v1, $v2, ... ] ] ) -> @paramNames | @values | $firstValue Adds parameters passed within request body. It keeps previous values, but places new ones first. Should be called only by engines. Otherwise use param() method.ObjectMethod param ([-name=>$name,-value=>$value|-name => $name, -values => [ $v1, $v2, ... ] | $name, $v1, $v2, ... | name, [ $v1, $v2, ... ] ] ) -> @paramNames | @values | $firstValue
ObjectMethod cookie ($name[,$value,$path,$secure,$expires]) -> $value
@paramNam"> ObjectMethod delete (@paramNames)Deletes parameters from request.Delete() alias provided for compatibility with CGI
ObjectMethod deleteAll ()Deletes all parameter name and value(s).delete_all() alias provided for compatibility with CGI.
ObjectMethod header ([-name=>$name,-value=>$value|-name => $name, -values => [ $v1, $v2, ... ] | $name, $v1, $v2, ... | name, [ $v1, $v2, ... ] ] ) -> @paramNames | @values | $firstValue Gets/Sets a header field:
http method. %ENV is not available and must be replaced
by calls to this and other methods of this class. http is
provided for compatibility, but is deprecated. Use this one
instead.
Calls to CGI header method must be replaced by calls to
TWiki::Response header method.
ObjectMethod save ($fh)Saves object state to filehandle. Object may be loaded latter passing $fh to new constructor or by calling load().ObjectMethod load ($fh)Loads object state from filehandle, probably created with a previous save().ObjectMethod upload ($name) -> $handleCalled with file name parameter returns an open filehandle to uploaded file.
ObjectMethod uploadInfo ($fname) -> $headersReturns a hashref to information about uploaded files as sent by browser.ObjectMethod tmpFileName ($fname) -> $tmpFileNameReturns the name of temporarly created file to store uploaded $fname. $fname may be obtained by callingparam() with form field name.
ObjectMethod uploads ([\%uploads]) -> $hashrefGets/Sets request uploads field. Keys are uploaded file names, as sent by browser, and values are TWiki::Request::Upload objects.ObjectMethod http ([$header]) -> $valueDEPRECATEDCalled without parameters returns a list of all available header filed names. Given a field name returns value associated. http('HTTP_USER_AGENT'); http('User-Agent') and http('User_Agent') are equivalent. Please, useheader() instead. Present only for compatibility with CGI.
ObjectMethod https ([$name]) -> $value||$secureDEPRECATEDSimilar tohttp() method above. Called with no parameters returns
secure flag.
Please, use header() and secure() instead.
Present only for compatibility with CGI.
ObjectMethod userAgent () -> $userAgent;Convenience method to get User-Agent string.user_agent() alias provided for compatibility with CGI.
ObjectMethod referer ()Convenience method to get Referer uri. |