From 6e5692427495536566a252e671003e587eb1988a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 5 Apr 2022 20:03:10 -0700 Subject: [PATCH] doc: simplify Http2Stream encoding text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/42597 Reviewed-By: Paolo Insogna Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Akhil Marsonya Reviewed-By: Tobias Nießen Reviewed-By: Harshitha K P Reviewed-By: Daijiro Wachi --- doc/api/http2.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 0ed65d8afb621d..5ebd5c1618a6e1 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1013,10 +1013,9 @@ All `Http2Stream` instances are [`Duplex`][] streams. The `Writable` side of the `Duplex` is used to send data to the connected peer, while the `Readable` side is used to receive data sent by the connected peer. -The default text character encoding for all `Http2Stream`s is UTF-8. As a best -practice, it is recommended that when using an `Http2Stream` to send text, -the `'content-type'` header should be set and should identify the character -encoding used. +The default text character encoding for an `Http2Stream` is UTF-8. When using an +`Http2Stream` to send text, use the `'content-type'` header to set the character +encoding. ```js stream.respond({