Node.js: response body chunk can now be a Uint8Array.
Starting from Node.js 15.0.0 the chunk parameter of the response.write() can be a Uint8Array. This closes #870 issue on GitHub.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
require('http').createServer(function (req, res) {
|
||||
res.writeHead(200, {'Content-Type': 'text/plain'})
|
||||
.end(new Buffer([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]));
|
||||
.end(Buffer.from('buffer', 'utf8'));
|
||||
}).listen(7080);
|
||||
|
||||
Reference in New Issue
Block a user