mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
await request.post_body() method, closes #897
This commit is contained in:
parent
c5f06bc356
commit
1f6a134369
3 changed files with 37 additions and 3 deletions
|
|
@ -48,11 +48,14 @@ The request object is passed to various plugin hooks. It represents an incoming
|
|||
``.actor`` - dictionary (str -> Any) or None
|
||||
The currently authenticated actor (see :ref:`actors <authentication_actor>`), or ``None`` if the request is unauthenticated.
|
||||
|
||||
The object also has one awaitable method:
|
||||
The object also has two awaitable methods:
|
||||
|
||||
``await request.post_vars()`` - dictionary
|
||||
Returns a dictionary of form variables that were submitted in the request body via ``POST``. Don't forget to read about :ref:`internals_csrf`!
|
||||
|
||||
``await request.post_body()`` - bytes
|
||||
Returns the un-parsed body of a request submitted by ``POST`` - useful for things like incoming JSON data.
|
||||
|
||||
.. _internals_multiparams:
|
||||
|
||||
The MultiParams class
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue