summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSid <122173059+hugo-sid@users.noreply.github.com>2023-03-23 01:33:18 +0530
committerGitHub <noreply@github.com>2023-03-22 13:03:18 -0700
commit265841f86683e8881194c471cb658fe3bd31f8cc (patch)
tree017e825bfeb6df74c841aa6aab741685e31c640b
parentb16392fbb9aee707c0449f10dab6bfd9ad4b8799 (diff)
docs: improve clarity of sentences (#1489)
* docs: improve clarity of sentences Improved clarity by rephrasing sentences in the best practices section. * docs: improve best practices section * use appropriate formatting for stdin * include EOF in abbreviated form * docs: clarify sentence * change 'know that' -> 'note that' * use neither nor for better clarity
-rw-r--r--docs/README.md7
1 files changed, 2 insertions, 5 deletions
diff --git a/docs/README.md b/docs/README.md
index 7dbdaf11..b63752a9 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -2395,12 +2395,9 @@ fi
The default behavior of automatically reading `stdin` is typically not desirable during non-interactive invocations.
You most likely want to use the `--ignore-stdin` option to disable it.
-It is a common *gotcha* that without this option HTTPie seemingly hangs.
-What happens is that when HTTPie is invoked, for example, from a cron job, `stdin` is not connected to a terminal.
-Therefore, the rules for [redirected input](#redirected-input) apply, i.e. HTTPie starts to read it expecting that the request body will be passed through.
-And since there’s neither data nor `EOF`, it will get stuck. So unless you’re piping some data to HTTPie, the `--ignore-stdin` flag should be used in scripts.
+It's important to note that without the `--ignore-stdin` option, HTTPie may appear to have stopped working (hang). This happens because, in situations where HTTPie is invoked outside of an interactive session, such as from a cron job, `stdin` is not connected to a terminal. This means that the rules for [redirected input](#redirected-input) will be followed. When `stdin` is redirected, HTTPie assumes that the input will contain the request body, and it waits for the input to be provided. But, since there is neither any input data nor an end-of-file (`EOF`) signal, HTTPie gets stuck. To avoid this problem, the `--ignore-stdin` flag should be used in scripts, unless data is being piped to HTTPie.
-Also, it might be good to set a connection `--timeout` limit to prevent your program from hanging if the server never responds.
+To prevent your program from becoming unresponsive when the server fails to respond, it's a good idea to use the `--timeout` option to set a connection timeout limit.
## Plugin manager