NAME
perfSONAR_PS::Request - A module that provides an object to interact with for each client request.
DESCRIPTION
This module is to be treated as an object representing a request from a user. The object can be used to get the users request in DOM format as well as set and send the response.
SYNOPSIS
DETAILS
API
new ($package, $call, $http_request)
The 'call' argument is the resonse from HTTP::Daemon->accept(). The request is the actual http request from the user. In general, it can be obtained from the call variable specified above using the '->get_request' function. If it is unspecified, new will try to obtain the request from $call directly.
getURI($self)
Returns the URI of the given request
setRequest($self, $request)
(Re-)Sets the request from the client. The request must be a HTT::Daemon::ClientConn object.
getURI($self)
Returns the URI for the specified request.
getRawRequest($self)
Returns the request as it was given to the object(i.e. the underlying HTTP::Daemon::ClientConn object).
getRequestDOM($self)
Gets and returns the contents of the request as a DOM object.
setResponse($self, $content)
Sets the response to the content.
getResponse($self)
Gets and returns the response as a string.
setNamespaces($self,\%ns)
(Re-)Sets the the namespaces in the request.
getNamespaces($self)
Gets and returns the hash containing the namespaces for the given request.
parse($self, $ns, $error)
Parses the request and remaps the elements in the request according to the specified namespaces. It returns -1 on error and 0 if everything parsed.
remapRequest($self, $ns)
Remaps the given request according to the prefix/uri pairs specified in the $ns hash.
finish($self)
Sends the response to the client and closes the connection
SEE ALSO
Exporter, HTTP::Daemon, Log::Log4perl, perfSONAR_PS::Transport XML::XPath, perfSONAR_PS::Common, perfSONAR_PS::Messages
To join the 'perfSONAR-PS' mailing list, please visit:
https://mail.internet2.edu/wws/info/i2-perfsonar
The perfSONAR-PS subversion repository is located at:
https://svn.internet2.edu/svn/perfSONAR-PS
Questions and comments can be directed to the author, or the mailing list. Bugs, feature requests, and improvements can be directed here:
https://bugs.internet2.edu/jira/browse/PSPS
VERSION
$Id:$
AUTHOR
Aaron Brown, aaron@internet2.edu, Jason Zurawski, zurawski@internet2.edu
LICENSE
You should have received a copy of the Internet2 Intellectual Property Framework along with this software. If not, see <http://www.internet2.edu/membership/ip.html>
COPYRIGHT
Copyright (c) 2004-2007, Internet2 and the University of Delaware
All rights reserved.