mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-03 11:53:31 +03:00
Minor docs changes
This commit is contained in:
parent
9024c2e94e
commit
98b5b2abd8
|
@ -3,6 +3,8 @@ Resource example - An object store
|
||||||
|
|
||||||
* http://api.django-rest-framework.org/object-store/
|
* http://api.django-rest-framework.org/object-store/
|
||||||
|
|
||||||
|
This example shows an object store API that can be used to store arbitrary serializable content.
|
||||||
|
|
||||||
``urls.py``
|
``urls.py``
|
||||||
|
|
||||||
.. include:: ../../examples/objectstore/urls.py
|
.. include:: ../../examples/objectstore/urls.py
|
||||||
|
|
|
@ -82,7 +82,10 @@ Or access it from the command line using curl:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
bash: curl -X POST -H 'X-Requested-With: XMLHttpRequest' --data 'foo=bar' http://api.django-rest-framework.org/simple-example/
|
bash: curl -X POST -H 'X-Requested-With: XMLHttpRequest' --data 'foo=testing' http://api.django-rest-framework.org/simple-example/
|
||||||
|
{"detail": {"bar": ["This field is required."], "baz": ["This field is required."]}}
|
||||||
|
|
||||||
|
bash: curl -X POST -H 'X-Requested-With: XMLHttpRequest' -H 'Content-Type: application/json' --data-binary '{"foo":"testing"}' http://api.django-rest-framework.org/simple-example/
|
||||||
{"detail": {"bar": ["This field is required."], "baz": ["This field is required."]}}
|
{"detail": {"bar": ["This field is required."], "baz": ["This field is required."]}}
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
Loading…
Reference in New Issue
Block a user