http: makes response.writeHead return the response · nodejs/node@a5247cc · GitHub
Skip to content

Commit a5247cc

Browse files
qubytetargos
authored andcommitted
http: makes response.writeHead return the response
Fixes: #25935 PR-URL: #25974 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 9420a73 commit a5247cc

3 files changed

Lines changed: 37 additions & 3 deletions

File tree

doc/api/http.md

Lines changed: 13 additions & 3 deletions

lib/_http_server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ function writeHead(statusCode, reason, obj) {
268268
}
269269

270270
this._storeHeader(statusLine, headers);
271+
272+
return this;
271273
}
272274

273275
// Docs-only deprecated: DEP0063
Lines changed: 22 additions & 0 deletions

0 commit comments

Comments
 (0)