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 | Locates a child resource of this resource. |
Method | child_ | This method locates a child with a trailing "/"
in the URL. |
Method | putChild | Register a static child. |
Method | http_GET | Respond to a GET request. |
Inherited from RenderMixin:
Method | allowedMethods | |
Method | checkPreconditions | Checks all preconditions imposed by this resource upon a request made |
Method | renderHTTP | See iweb.IResource.renderHTTP . |
Method | http_OPTIONS | Respond to a OPTIONS request. |
Method | http_TRACE | Respond to a TRACE request. |
Method | http_HEAD | Respond to a HEAD request. |
Method | render | Subclasses should implement this method to do page rendering. |
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. |
This implementation registers children by assigning them to attributes
with a child_
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 .
|
This implementation validates that the request body is empty and then
dispatches the given request
to render
and returns its result.
Parameters | request | the request to process. |
Returns | an object adaptable to iweb.IResponse .
|