From 3e156af5af21f18e500c3091ee5c1019990a7d88 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 d213572f873561..e4a55208d02a8d 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1009,10 +1009,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({