HTTPRequest
The HTTPRequest class is accessible via the paste.webkit.wkrequest module.
Methods
f cookie(self, name, default=<class paste.webkit.wkcommon.NoDefault at 0xb75a18fc>) ...
Returns the value of the specified cookie.
f cookies(self) ...
Returns a dictionary-style object of all Cookie objects the client sent with this request.
f serverDictionary(self) ...
Returns a dictionary with the data the web server gave us, like HTTP_HOST or HTTP_USER_AGENT.
f session(self) ...
Returns the session associated with this request, either as specified by sessionId() or newly created. This is a convenience for transaction.session()
f isSessionExpired(self) ...
Returns bool: whether or not this request originally contained an expired session ID. Only works if the Application.config setting "IgnoreInvalidSession" is set to 1; otherwise you get a canned error page on an invalid session, so your servlet never gets processed.
f remoteUser(self) ...
Always returns None since authentication is not yet supported. Take from CGI variable REMOTE_USER.
f remoteAddress(self) ...
Returns a string containing the Internet Protocol (IP) address of the client that sent the request.
f remoteName(self) ...
Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined.
f adapterName(self) ...
Returns the name of the adapter as it appears in the URL. Example: '/WebKit.cgi' This is useful in special cases when you are constructing URLs. See Testing/Main.py for an example use.
f rawInput(self, rewind=0) ...
This gives you a file-like object for the data that was sent with the request (e.g., the body of a POST request, or the documented uploaded in a PUT request).
The file might not be rewound to the beginning if there was valid, form-encoded POST data. Pass rewind=1 if you want to be sure you get the entire body of the request.
f queryString(self) ...
Returns the query string portion of the URL for this request. Taken from the CGI variable QUERY_STRING.
f method(self) ...
Returns the HTTP request method (in all uppercase), typically from the set GET, POST, PUT, DELETE, OPTIONS and TRACE.
f sessionId(self) ...
Returns a string with the session id specified by the client, or None if there isn't one.
See the source for more information.