| Home | Trees | Index | Help |
|---|
| Package qm :: Module web :: Class WebRequest |
|
An object representing a request from the web server.
A 'WebRequest' object behaves as a dictionary of key, value pairs representing query arguments, for instance query fields in a POST, or arguments encoded in a URL query string. It has some other methods as well.| Method Summary | |
|---|---|
Create a new request object. | |
__delitem__(self,
key)
| |
__getitem__(self,
key)
| |
__setitem__(self,
key,
value)
| |
__str__(self)
| |
Return an opening form tag for this request. | |
Return the URL representation of this request. | |
Return a duplicate of this request. | |
get(self,
key,
default)
| |
Return the name of the script that processes this request. | |
Return the session for this request. | |
Return the session ID for this request. | |
Return the URL of the script that processes this request. | |
has_key(self,
key)
| |
items(self)
| |
keys(self)
| |
Set the session ID for this request to 'session_id'. | |
| Method Details |
|---|
__init__(self,
script_url,
base=None,
keep_fields=False,
**fields)
|
AsForm(self, method='get', name=None)Return an opening form tag for this request. 'method' -- The HTML method to use for the form, either "get" or "post". 'name' -- A name for the form, or 'None'. returns -- An opening form tag for the request, plus hidden input elements for arguments to the request. The caller must add additional inputs, the submit input, and close the form tag. |
AsUrl(self, last_argument=None)Return the URL representation of this request. 'fields_at_end' -- If not 'None', the name of the URL query arguments that should be placed last in the list of arugmnets (other than this, the order of query arguments is not defined). |
copy(self, url=None, **fields)Return a duplicate of this request. 'url' -- The URL for the request copy. If 'None', use the URL of the source. '**fields' -- Additional fields to set in the copy. |
GetScriptName(self)Return the name of the script that processes this request. The script name is the final element of the full URL path. |
GetSession(self)Return the session for this request. raises -- 'NoSessionError' if no session ID is specified in the request. raises -- 'InvalidSessionError' if the session ID specified in the request is invalid. |
GetSessionId(self)Return the session ID for this request. returns -- A session ID, or 'None'. |
GetUrl(self)Return the URL of the script that processes this request. |
SetSessionId(self, session_id)Set the session ID for this request to 'session_id'. |
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Sep 27 15:49:06 2007 | http://epydoc.sf.net |