class documentation

class HeadlessReturner:

Implements interfaces: twisted.web.resource.IResource

View In Hierarchy

A resource that implements GET but not HEAD, and returns bytes when rendering GET.

Method getChildWithDefault Return a child with the given name for the given request. This is the external interface used by the Resource publishing machinery. If implementing IResource without subclassing Resource, it must be provided...
Method isLeaf Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.
Method putChild Put a child IResource implementor at the given path.
Method render Leave the request open for future writes.
Class Variable allowedMethods Undocumented
Instance Variable request Undocumented
def getChildWithDefault(self, name, request):

Return a child with the given name for the given request. This is the external interface used by the Resource publishing machinery. If implementing IResource without subclassing Resource, it must be provided. However, if subclassing Resource, getChild overridden instead.

Parameters
name:bytesA 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.
request:twisted.web.server.RequestA representation of all of the information about the request that is being made for this child.
def isLeaf(self):

Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.

def putChild(self, path, child):

Put a child IResource implementor at the given path.

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.

The path component is not URL-encoded -- pass b'foo bar' rather than b'foo%20bar'.

childUndocumented
def render(self, request):

Leave the request open for future writes.

allowedMethods: list[bytes] =

Undocumented

request =

Undocumented