From 7225a7d46b637c8af5fbb43f7b3a148b4b0930c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= Date: Fri, 28 Oct 2022 01:45:05 +0200 Subject: [PATCH] doc, http: add Uint8Array as allowed type OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: https://github.com/nodejs/node/pull/45167 Reviewed-By: Paolo Insogna Reviewed-By: Matteo Collina Reviewed-By: Antoine du Hamel --- doc/api/http.md | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index d3852992522683..d0bebabe5c4bda 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -750,12 +750,15 @@ See [`writable.cork()`][]. -* `data` {string|Buffer} +* `data` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {this} @@ -1205,9 +1208,13 @@ before the [`'finish'`][] event is emitted. -* `chunk` {string|Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {boolean} @@ -1740,12 +1747,15 @@ See [`writable.cork()`][]. -* `data` {string|Buffer} +* `data` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {this} @@ -2094,9 +2104,13 @@ before the [`'finish'`][] event is emitted. -* `chunk` {string|Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} **Default:** `'utf8'` * `callback` {Function} * Returns: {boolean} @@ -2784,11 +2798,14 @@ and is connected, that socket will be destroyed as well. -* `chunk` {string | Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} Optional, **Default**: `utf8` * `callback` {Function} Optional * Returns: {this} @@ -3044,11 +3061,14 @@ Always `false`. -* `chunk` {string | Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} **Default**: `utf8` * `callback` {Function} * Returns {boolean}