Files
deb-python-falcon/docs/api/request_and_response.rst
Kurt Griffiths b51d4e9a35 feat(Request): Add support for several proxy "forwarded" headers (#1083)
Add support for some "forwarded" headers, included several new
attributes and a reworking of some of the existing code to better
facilitate sharing and performance.

Also clean up a couple tiny nits in the docstrings for the sake of
consistency.
2017-07-17 16:43:06 -05:00

553 B

Request & Response

Instances of the Request and Response classes are passed into responders as the second and third arguments, respectively.

import falcon


class Resource(object):

    def on_get(self, req, resp):
        resp.body = '{"message": "Hello world!"}'
        resp.status = falcon.HTTP_200

Request

falcon.Request

falcon.Forwarded

Response

falcon.Response