mirror of
https://github.com/httpie/cli.git
synced 2025-01-09 15:18:25 +01:00
README
This commit is contained in:
parent
0001297f41
commit
f9a488d47e
17
README.rst
17
README.rst
@ -499,8 +499,8 @@ their type is distinguished only by the separator used:
|
|||||||
+------------------------------+---------------------------------------------------+
|
+------------------------------+---------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
Note that data fields aren’t the only way to specify request data:
|
Note that the structured data fields aren’t the only way to specify request data:
|
||||||
The `specifying raw request body`_ section describes mechanisms for passing arbitrary request data.
|
The `raw request body`_ section describes mechanisms for passing arbitrary request data.
|
||||||
|
|
||||||
|
|
||||||
Escaping rules
|
Escaping rules
|
||||||
@ -632,15 +632,18 @@ fields using ``=@`` and ``:=@``:
|
|||||||
Raw and complex JSON
|
Raw and complex JSON
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
Please note that with the `request items`_ data field syntax, commands
|
Please note that with the structured `request items`_ data field syntax, commands
|
||||||
can quickly become unwieldy when sending complex structures.
|
can quickly become unwieldy when sending complex structures.
|
||||||
In such cases, it’s better to pass the full raw JSON data via
|
In such cases, it’s better to pass the full raw JSON data as a `raw request body`_, for example:
|
||||||
`redirected input`_, for example:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ echo '{"hello": "world"}' | http POST pie.dev/post
|
$ echo '{"hello": "world"}' | http POST pie.dev/post
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ http --raw '{"hello": "world"}' POST pie.dev/post
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ http POST pie.dev/post < files/data.json
|
$ http POST pie.dev/post < files/data.json
|
||||||
@ -1353,8 +1356,8 @@ which you don’t care about. The response headers are downloaded always,
|
|||||||
even if they are not part of the output
|
even if they are not part of the output
|
||||||
|
|
||||||
|
|
||||||
Specifying raw request body
|
Raw request body
|
||||||
===========================
|
================
|
||||||
|
|
||||||
In addition to crafting structured `JSON`_ and `forms`_ requests with the
|
In addition to crafting structured `JSON`_ and `forms`_ requests with the
|
||||||
`request items`_ syntax, you can provide a raw request body that will be
|
`request items`_ syntax, you can provide a raw request body that will be
|
||||||
|
Loading…
Reference in New Issue
Block a user