From 9929cd6861ee674306289777f4947df2db7a9073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= <18708370+Flarna@users.noreply.github.com> Date: Tue, 25 Oct 2022 13:30:49 +0200 Subject: [PATCH 1/2] doc, http: add Uint8Array as allowed type OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. --- doc/api/http.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index d3852992522683..6da9f333cd8f00 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -755,7 +755,7 @@ changes: description: This method now returns a reference to `ClientRequest`. --> -* `data` {string|Buffer} +* `data` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {this} @@ -1207,7 +1207,7 @@ before the [`'finish'`][] event is emitted. added: v0.1.29 --> -* `chunk` {string|Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {boolean} @@ -1745,7 +1745,7 @@ changes: description: This method now returns a reference to `ServerResponse`. --> -* `data` {string|Buffer} +* `data` {string|Buffer|Uint8Array} * `encoding` {string} * `callback` {Function} * Returns: {this} @@ -2096,7 +2096,7 @@ before the [`'finish'`][] event is emitted. added: v0.1.29 --> -* `chunk` {string|Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} **Default:** `'utf8'` * `callback` {Function} * Returns: {boolean} @@ -2788,7 +2788,7 @@ changes: description: add `callback` argument. --> -* `chunk` {string | Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} Optional, **Default**: `utf8` * `callback` {Function} Optional * Returns: {this} @@ -3048,7 +3048,7 @@ changes: description: The `callback` argument was added. --> -* `chunk` {string | Buffer} +* `chunk` {string|Buffer|Uint8Array} * `encoding` {string} **Default**: `utf8` * `callback` {Function} * Returns {boolean} From faf0ceb606ec073ef8b5b4a5fae034200437cd9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= <18708370+Flarna@users.noreply.github.com> Date: Wed, 26 Oct 2022 21:43:41 +0200 Subject: [PATCH 2/2] fixup: add version/link to PR --- doc/api/http.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/api/http.md b/doc/api/http.md index 6da9f333cd8f00..d0bebabe5c4bda 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -750,6 +750,9 @@ See [`writable.cork()`][]. * `chunk` {string|Buffer|Uint8Array} @@ -1740,6 +1747,9 @@ See [`writable.cork()`][]. * `chunk` {string|Buffer|Uint8Array} @@ -2784,6 +2798,9 @@ and is connected, that socket will be destroyed as well. @@ -3044,6 +3061,9 @@ Always `false`.