Part of twisted.web2.resource View Source View In Hierarchy
Known subclasses: twisted.web2.dirlist.DirectoryLister, twisted.web2.plugin.PluginResource, twisted.web2.resource.PostableResource, twisted.web2.static.Data, twisted.web2.twcgi.CGIDirectory, twisted.web2.vhost.NameVirtualHost, twisted.web2.xmlrpc.XMLRPC
Implements interfaces: twisted.web2.iweb.IResource
iweb.IResource
implementation with some convenient mechanisms for locating children.
Method | locateChild | No summary |
Method | child_ | This method locates a child with a trailing "/"
in the URL. @param request: the request to process.
|
Method | putChild | Register a static child. |
Method | http_GET | Respond to a GET request. |
Inherited from RenderMixin:
Method | allowedMethods | |
Method | checkPreconditions | No summary |
Method | renderHTTP | See iweb.IResource.renderHTTP .
|
Method | http_OPTIONS | Respond to a OPTIONS request. @param request: the request to process.
@return: an object adaptable to iweb.IResponse .
|
Method | http_TRACE | Respond to a TRACE request. @param request: the request to process.
@return: an object adaptable to iweb.IResponse .
|
Method | http_HEAD | Respond to a HEAD request. @param request: the request to process.
@return: an object adaptable to iweb.IResponse .
|
Method | render | No summary |
Parameters | request | the request to process. |
segments | a sequence of URL path segments. | |
Returns | a tuple of (child, segments) containing the child of this
resource which matches one or more of the given segments in
sequence, and a list of remaining segments.
|
"/"
in the URL.
Parameters | request | the request to process. |
Register a static child.
This implementation registers children by assigning them to attributes with achild_
prefix.
resource.putChild("foo", child)
is therefore same as
o.child_foo = child
.
Parameters | path | the name of the child to register. You almost certainly don't want
"/" in path . If you want to add a
"directory" resource (e.g. /foo/ ) specify
path as "" .
|
child | an object adaptable to iweb.IResource .
|
Respond to a GET request.
This implementation validates that the request body is empty and then dispatches the givenrequest
to render
and returns its result.
Parameters | request | the request to process. |
Returns | an object adaptable to iweb.IResponse .
|