From 217cf8ddae3615a2a0d96f7842c5feb22e5d9d0f Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Sun, 23 Jan 2022 17:17:58 +0100 Subject: [PATCH] Document auto-stream --- docs/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/README.md b/docs/README.md index de82137c..9694e628 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1954,6 +1954,8 @@ You can use the `--stream, -S` flag to make two things happen: 1. The output is flushed in much smaller chunks without any buffering, which makes HTTPie behave kind of like `tail -f` for URLs. 2. Streaming becomes enabled even when the output is prettified: It will be applied to each line of the response and flushed immediately. This makes it possible to have a nice output for long-lived requests, such as one to the [Twitter streaming API](https://developer.twitter.com/en/docs/tutorials/consuming-streaming-data). +The `--stream` option is automatically enabled when the response headers include `Content-Type: text/event-stream`. + ### Example use cases Prettified streamed response: