class documentation
class Response: (source)
Metadata about an HTTP response, with an object that Klein knows how to understand.
This includes:
- an HTTP response code
- some HTTP headers
- a body object, which can be anything else Klein understands; for example, an IResource, an IRenderable, str, bytes, etc.
Present Since | |
Klein NEXT |
Instance Variable | body |
Undocumented |
Instance Variable | code |
Undocumented |
Instance Variable | headers |
Undocumented |
Method | _apply |
Apply this Response to the given IRequest , setting its response code and headers. |
Apply this Response
to the given IRequest
, setting its response code and headers.
Private because:
- this should only ever be applied by Klein, and
- hopefully someday soon this will be replaced with something that actually creates a txrequest-style response object.
Parameters | |
request:IRequest | Undocumented |
Returns | |
Any | Undocumented |