Part of twisted.web2.server View Source View In Hierarchy
Implements interfaces: twisted.web2.iweb.IRequest
remoteAddr
scheme host port path params querystring
args files
prepath postpath
Instance Variables | path | The path only (arguments not included). |
args | All of the arguments, including URL and POST arguments. (type: 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']}. ) |
Method | __init__ | |
Method | addResponseFilter | Undocumented |
Method | unparseURL | Turn the request path into a url string. For any pieces of |
Method | process | Process a request. |
Method | preprocessRequest | Do any request processing that doesn't follow the normal |
Method | urlForResource | Looks up the URL of the given resource if this resource was found while |
Method | locateResource | Looks up the resource with the given URL. |
Method | locateChildResource | Looks up the child resource with the given name given the parent |
Method | renderHTTP_exception | Undocumented |
Method | _parseURL | Undocumented |
Method | _fixupURLParts | Undocumented |
Method | _getChild | Call res.locateChild, and pass the result on to _handleSegment. |
Method | _handleSegment | Handle the result of a locateChild call done in _getChild. |
Method | _rememberResource | Remember the URL of a visited resource. |
Method | _processingFailed | Undocumented |
Method | _processingReallyFailed | Undocumented |
Method | _cbFinishRender | Undocumented |
Inherited from Request:
Method | checkExpect | Ensure there are no expectations that cannot be met. |
Method | handleContentChunk | Callback from channel when a piece of data has been received. |
Method | handleContentComplete | Callback from channel when all data has been received. |
Method | connectionLost | connection was lost |
Method | __repr__ | Undocumented |
Method | writeResponse | Write a response. |
Method | _sendContinue | Undocumented |
Method | _finished | We are finished writing data. |
Method | _error | Undocumented |
Parameters | chanRequest | the channel request we're associated with. |
locateResource
.
Note that a resource may be found at multiple URIs; if the same resource is visited at more than one location while processing this request, this method will return one of those URLs, but which one is not defined, nor whether the same URL is returned in subsequent calls.
Parameters | resource | the resource to find a URI for. This resource must have been obtained from
the request (ie. via its uri attribute, or through its
locateResource or locateChildResource methods).
|
Returns | a valid URL for resource in this request.
| |
Raises | NoURLForResourceError | if resource has no URL in this request (because it was not
obtained from the request).
|
Parameters | uri | The URL of the desired resource. |
Returns | a Deferred
resulting in the IResource at the
given URL or None if no such resource can be located.
| |
Raises | HTTPError | If url is not a URL on the site that this request is being
applied to. The contained response will have a status code of
responsecode.BAD_GATEWAY .
|
HTTPError | If url contains a query or fragment. The contained response
will have a status code of responsecode.BAD_REQUEST .
|
Parameters | parent | the parent of the resource being looked up. This resource must have been
obtained from the request (ie. via its uri attribute, or
through its locateResource or locateChildResource
methods).
|
childName | the name of the child of parent to looked up. to
parent .
| |
Returns | a Deferred
resulting in the IResource at the
given URL or None if no such resource can be located.
| |
Raises | NoURLForResourceError | if resource was not obtained from the request.
|