A HTTP request.
Subclasses should override the process() method to determine how the
request will be processed.
|
|
|
__providedBy__(...)
Object Specification Descriptor |
source code
|
|
|
|
|
|
|
_cleanup(self)
Called when have finished responding and are no longer queued. |
|
|
|
_sendError(self,
code,
resp='
' ) |
|
|
|
addCookie(self,
k,
v,
expires=None,
domain=None,
path=None,
max_age=None,
comment=None,
secure=None)
Set an outgoing HTTP cookie. |
|
|
|
connectionLost(self,
reason)
connection was lost |
|
|
|
finish(self)
We are finished writing data. |
|
|
|
getAllHeaders(self)
Return dictionary of all headers the request received. |
|
|
|
|
|
|
|
getCookie(self,
key)
Get a cookie that was sent from the network. |
|
|
|
getHeader(self,
key)
Get a header that was sent from the network. |
|
|
|
getHost(self)
Get my originally requesting transport's host. |
|
|
|
|
|
|
|
|
|
gotLength(self,
length)
Called when HTTP channel got length of content in this request. |
|
|
|
|
|
|
|
|
|
|
|
process(self)
Override in subclasses. |
|
|
|
redirect(self,
url)
Utility function that does a redirect. |
|
|
|
registerProducer(self,
producer,
streaming)
Register a producer. |
|
|
|
requestReceived(self,
command,
path,
version)
Called by channel when all data has been received. |
|
|
|
setETag(self,
etag)
Set an entity
tag for the outgoing response. |
|
|
|
setHeader(self,
k,
v)
Set an outgoing HTTP header. |
|
|
|
setHost(self,
host,
port,
ssl=0)
Change the host and port the request thinks it's using. |
|
|
|
setLastModified(self,
when)
Set the Last-Modified time for the response to this
request. |
|
|
|
setResponseCode(self,
code,
message=None)
Set the HTTP response code. |
|
|
|
unregisterProducer(self)
Unregister the producer. |
|
|
|
write(self,
data)
Write some data as a result of an HTTP request. |
|
|
A mapping of strings (the argument names) to lists of values. i.e.,
?foo=bar&foo=baz&quux=spam results in {'foo': ['bar', 'baz'],
'quux': ['spam']}.
|
args
All of the arguments, including URL and POST arguments.
|
|
method = ' (no method yet) '
The HTTP method that was used.
|
|
path
The path only (arguments not included).
|
|
received_headers
All received headers
|
|
uri = ' (no uri yet) '
The full URI that was requested (includes arguments).
|