1
0
mirror of https://github.com/httpie/cli.git synced 2026-04-24 19:53:55 +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:
Marcel Stör
2021-07-02 10:31:38 +02:00
committed by GitHub
parent 5717fb1ad5
commit 5d4e7a9a18
+3 -3
View File
@@ -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
$ echo '{"hello": "world"}' | http POST pie.dev/post
$ echo -n '{"hello": "world"}' | http POST pie.dev/post
.. code-block:: bash
@@ -1409,7 +1409,7 @@ You can use ``echo`` for simple data:
.. 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*:
@@ -1455,7 +1455,7 @@ on the command line:
.. 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