From 5d4e7a9a18e0e73ab1b1f7ccde7341a69d829b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20St=C3=B6r?= Date: Fri, 2 Jul 2021 10:31:38 +0200 Subject: [PATCH] Use `echo -n` in the docs (#1102) I argue that you most likely don't want/need to send the trailing newline. --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 7e583ce7..7cfea753 100644 --- a/README.rst +++ b/README.rst @@ -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