From 7fd9444728e1e509630f5ba0f50e7f9da150369c Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 6 Aug 2019 16:24:11 +0300 Subject: Node.js: returning "this" from writeHead() to allow chaining. In Node.js version 11.10.0 and later, the writeHead() function returns "this". --- test/node/status_message/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/node/status_message') diff --git a/test/node/status_message/app.js b/test/node/status_message/app.js index 4f3b064a..e8a798dd 100755 --- a/test/node/status_message/app.js +++ b/test/node/status_message/app.js @@ -1,6 +1,5 @@ #!/usr/bin/env node require('unit-http').createServer(function (req, res) { - res.writeHead(200, 'blah', {'Content-Type': 'text/plain'}); - res.end(); + res.writeHead(200, 'blah', {'Content-Type': 'text/plain'}).end(); }).listen(7080); -- cgit