Add example of amending request object

This commit is contained in:
jacob
2019-01-02 14:52:25 +08:00
parent cea1547e08
commit 613b23748d
2 changed files with 38 additions and 0 deletions

View File

@@ -156,4 +156,12 @@ execution support provided by the ``pytest-xdist`` plugin.
.. literalinclude:: ../../examples/pytest_xdist.py
Amending Request Object
~~~~~~~~~~~~~~~~~~~~~~~
The ``request`` object in ``Sanic`` is a kind of ``dict`` object, this means that ``reqeust`` object can be manipulated as a regular ``dict`` object.
.. literalinclude:: ../../examples/amending_request_object.py
For more examples and useful samples please visit the `Huge-Sanic's GitHub Page <https://github.com/huge-success/sanic/tree/master/examples>`_