Python Paste


HTTPRequest


Methods

f __init__(self, transaction, environ) ...

f protocol(self) ...

f time(self) ...

f timeStamp(self) ...

f transaction(self) ...

f setTransaction(self, trans) ...

f value(self, name, default=<class paste.webkit.wkcommon.NoDefault at 0xb75a18fc>) ...

f hasValue(self, name) ...

f extraURLPath(self) ...

f fieldStorage(self) ...

f field(self, name, default=<class paste.webkit.wkcommon.NoDefault at 0xb75a18fc>) ...

f hasField(self, name) ...

f fields(self) ...

f setField(self, name, value) ...

f delField(self, name) ...

f cookie(self, name, default=<class paste.webkit.wkcommon.NoDefault at 0xb75a18fc>) ...

Returns the value of the specified cookie.

f hasCookie(self, name) ...

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 setSessionExpired(self, sessionExpired) ...

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 urlPath(self) ...

f urlPathDir(self) ...

f getstate(self) ...

f setURLPath(self, path) ...

f serverSidePath(self, path=None) ...

f serverSideContextPath(self, path=None) ...

f contextName(self) ...

f servletURI(self) ...

This is the URI of the servlet, without any query strings or extra path info

f uriWebKitRoot(self) ...

f fsPath(self) ...

f serverURL(self) ...

f serverURLDir(self) ...

f siteRoot(self) ...

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 rawRequest(self) ...

f environ(self) ...

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 servletPath(self) ...

f contextPath(self) ...

f pathInfo(self) ...

f queryString(self) ...

Returns the query string portion of the URL for this request. Taken from the CGI variable QUERY_STRING.

f uri(self) ...

Returns the request URI, which is the entire URL except for the 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.

f config(self) ...

f info(self) ...

f htmlInfo(self) ...

See the source for more information.