Rename the "doc" folder to "docs" to be consistent with the tox env name. RTD also seems to expect "docs" as its first choice, even though it will discover "doc" as well.
34 lines
486 B
ReStructuredText
34 lines
486 B
ReStructuredText
.. _request:
|
|
|
|
Req/Resp
|
|
========
|
|
|
|
Instances of the Request and Response classes are passed into responders as the second
|
|
and third arguments, respectively.
|
|
|
|
.. code:: python
|
|
|
|
import falcon
|
|
|
|
|
|
class Resource(object):
|
|
|
|
def on_get(self, req, resp):
|
|
resp.body = '{"message": "Hello world!"}'
|
|
resp.status = falcon.HTTP_200
|
|
|
|
Request
|
|
-------
|
|
|
|
.. autoclass:: falcon.Request
|
|
:members:
|
|
|
|
Response
|
|
--------
|
|
|
|
.. autoclass:: falcon.Response
|
|
:members:
|
|
|
|
|
|
|