From 6fb74a995d51f7a73cd4cb9a530e7fee9166508b 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 3675329d0cbbe6..944eed36894d23 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -748,12 +748,15 @@ See [`writable.cork()`][]. -* `data` {string|Buffer} +* `data` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {this} @@ -1203,9 +1206,13 @@ before the [`'finish'`][] event is emitted. -* `chunk` {string|Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {boolean} @@ -1727,12 +1734,15 @@ See [`writable.cork()`][]. -* `data` {string|Buffer} +* `data` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {this} @@ -2081,9 +2091,13 @@ before the [`'finish'`][] event is emitted. -* `chunk` {string|Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} **Default:** `'utf8'` * `callback` {Function} * Returns: {boolean} @@ -2765,11 +2779,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} @@ -3025,11 +3042,14 @@ Always `false`. -* `chunk` {string | Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} **Default**: `utf8` * `callback` {Function} * Returns {boolean}