doc, http: add Uint8Array as allowed type#45167
doc, http: add Uint8Array as allowed type#45167nodejs-github-bot merged 2 commits intonodejs:mainfrom
Conversation
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer.
|
Review requested:
|
|
Perhaps we should add the first node version(s) in which they were supported as well? |
Do you know the versions? Seems this was done long time ago and not directly in HTTP instead somewhere else. I just know that the version differs between Update: it doesn't work on 14.x because #33155 was backported but #31818 was not therefore |
| --> | ||
|
|
||
| * `data` {string|Buffer} | ||
| * `data` {string|Buffer|Uint8Array} |
There was a problem hiding this comment.
I'm trying to remember, are other TypedArray types supported also? e.g. Uint16Array, Uint32Array, etc. If so, this should likely be updated to be TypedArray rather than just Uint8Array
There was a problem hiding this comment.
According to docs e.g. fs supports this but not http, see
Lines 836 to 845 in 775bf62
|
Landed in 760695b |
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
OutgoingMessage.write()/end() and their derived classes support also Uint8Array besides string and Buffer. PR-URL: #45167 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
OutgoingMessage.write()/end()and their derived classes support alsoUint8ArraybesidesstringandBuffer.