mirror of
https://github.com/httpie/cli.git
synced 2025-06-20 01:27:49 +02:00
Use echo -n
in the docs (#1102)
I argue that you most likely don't want/need to send the trailing newline.
This commit is contained in:
parent
5717fb1ad5
commit
5d4e7a9a18
@ -644,7 +644,7 @@ In such cases, it’s better to pass the full raw JSON data as a `raw request bo
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ echo '{"hello": "world"}' | http POST pie.dev/post
|
$ echo -n '{"hello": "world"}' | http POST pie.dev/post
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -1409,7 +1409,7 @@ You can use ``echo`` for simple data:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ echo '{"name": "John"}' | http PATCH pie.dev/patch X-API-Token:123
|
$ echo -n '{"name": "John"}' | http PATCH pie.dev/patch X-API-Token:123
|
||||||
|
|
||||||
|
|
||||||
You can also use a Bash *here string*:
|
You can also use a Bash *here string*:
|
||||||
@ -1455,7 +1455,7 @@ on the command line:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ echo 'data' | http POST example.org more=data # This is invalid
|
$ echo -n 'data' | http POST example.org more=data # This is invalid
|
||||||
|
|
||||||
|
|
||||||
To prevent HTTPie from reading ``stdin`` data you can use the
|
To prevent HTTPie from reading ``stdin`` data you can use the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user