# ``twisted`.`web`.`resource``

module documentation
(source)

Implementation of the lowest-level Resource class.

Interface | `IResource` | A web resource.
Class | `EncodingResourceWrapper` | Wrap a `IResource`, potentially applying an encoding to the response body generated.
Class | `ErrorPage` | `ErrorPage` is a resource which responds with a particular (parameterized) status and a body consisting of HTML containing some descriptive text. This is useful for rendering simple error pages.
Class | `ForbiddenResource` | `ForbiddenResource` is a specialization of `ErrorPage` which returns the FORBIDDEN HTTP response code.
Class | `NoResource` | `NoResource` is a specialization of `ErrorPage` which returns the HTTP response code NOT FOUND.
Class | `Resource` | Define a web-accessible resource.
Function | `getChildForRequest` | Traverse resource tree to find who will handle the request.
Interface | `_IEncodingResource` | A resource which knows about `_IRequestEncoderFactory`.
Function | `_computeAllowedMethods` | Compute the allowed methods on a `Resource` based on defined render_FOO methods. Used when raising `UnsupportedMethod` but `Resource` does not define `allowedMethods` attribute.

def getChildForRequest(resource, request): (source)
Traverse resource tree to find who will handle the request.
def _computeAllowedMethods(resource): (source)
Compute the allowed methods on a `Resource` based on defined render_FOO methods. Used when raising `UnsupportedMethod` but `Resource` does not define `allowedMethods` attribute.