Part of twisted.web.resource View Source View In Hierarchy
Known implementations: twisted.web._auth.wrapper.HTTPAuthSessionWrapper, twisted.web._auth.wrapper.UnauthorizedResource, twisted.web.resource.Resource, twisted.web.wsgi.WSGIResource
Attribute | isLeaf | Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource. |
Method | getChildWithDefault | No summary |
Method | putChild | Put a child IResource implementor at the given path. |
Method | render | Render a request. This is called on the leaf resource for a request. |
Parameters | name | A single path component from a requested URL. For example, a request for
http://example.com/foo/bar will result in calls to this method with
b"foo" and b"bar" as values
for this argument. (type: bytes ) |
request | A representation of all of the information about the request that is being
made for this child. (type: twisted.web.server.Request ) |
Parameters | path | A single path component, to be interpreted relative to the path this
resource is found at, at which to put the given child. For example, if
resource A can be found at http://example.com/foo then a call like
A.putChild(b"bar", B) will make resource B available
at http://example.com/foo/bar. (type: bytes ) |
Returns | Either server.NOT_DONE_YET to indicate an asynchronous or a
bytes instance to write as the response to the request. If
NOT_DONE_YET is returned, at some point later (for example, in
a Deferred callback) call
request.write(b"<html>") to write data to the
request, and request.finish() to send the data to the browser. | |
Raises | twisted.web.error.UnsupportedMethod | If the HTTP verb requested is not supported by this resource. |