module documentation
Utility implementations of IResource
.
Function | error |
Build a resource that responds to all requests with a particular HTTP status code and an HTML body containing some descriptive text. This is useful for rendering simple error pages. |
Function | forbidden |
Generate an IResource with a 403 Forbidden status code. |
Function | not |
Generate an IResource with a 404 Not Found status code. |
Class | _ |
_ErrorPage is a resource that responds to all requests with a particular (parameterized) HTTP status code and an HTML body containing some descriptive text. This is useful for rendering simple error pages. |
Build a resource that responds to all requests with a particular HTTP status code and an HTML body containing some descriptive text. This is useful for rendering simple error pages.
The resource dynamically handles all paths below it. Use IResource.putChild()
to override a specific path.
Parameters | |
code:int | An integer HTTP status code which will be used for the response. |
brief:str | A short string which will be included in the response body as the page title. |
detail:str | A longer string which will be included in the response body. |
Returns | |
_ErrorPage | An IResource |