From d3a6f9a396f7ff2fecb906a2e65cad31d4066703 Mon Sep 17 00:00:00 2001 From: chaoranz758 <2715584135@qq.com> Date: Sun, 8 Oct 2023 21:02:06 +0800 Subject: [PATCH] docs: add ChunkedBodyWriter effect display --- .../hertz/tutorials/framework-exten/response_writer.md | 8 ++++++++ .../hertz/tutorials/framework-exten/response_writer.md | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/content/en/docs/hertz/tutorials/framework-exten/response_writer.md b/content/en/docs/hertz/tutorials/framework-exten/response_writer.md index 2877aa69c0..f890e157cb 100644 --- a/content/en/docs/hertz/tutorials/framework-exten/response_writer.md +++ b/content/en/docs/hertz/tutorials/framework-exten/response_writer.md @@ -71,3 +71,11 @@ time.Sleep(200 * time.Millisecond) } }) ``` + +Effect display: + +Open the interface in the example at localhost:8888, and then use the following command to observe the effect: + +```bash +curl -N --location localhost:8888//flush/chunk +``` \ No newline at end of file diff --git a/content/zh/docs/hertz/tutorials/framework-exten/response_writer.md b/content/zh/docs/hertz/tutorials/framework-exten/response_writer.md index d8b0a28f2b..e701de5f7c 100644 --- a/content/zh/docs/hertz/tutorials/framework-exten/response_writer.md +++ b/content/zh/docs/hertz/tutorials/framework-exten/response_writer.md @@ -62,3 +62,11 @@ Hertz 在 `app.RequestContext` 中提供了 `Response.HijackWriter` 方法让用 } }) ``` + +效果展示: + +在 localhost:8888 开启示例中的接口,然后使用如下命令观察效果: + +```bash +curl -N --location localhost:8888//flush/chunk +```