Skip to content

Commit

Permalink
doc: simplify Http2Stream encoding text
Browse files Browse the repository at this point in the history
PR-URL: nodejs#42597
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
  • Loading branch information
Trott authored and juanarbol committed Apr 6, 2022
1 parent fb6a5ba commit 6e56924
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 6e56924

Please sign in to comment.