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.
553 B
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_200Request
falcon.Request
falcon.Forwarded
Response
falcon.Response