http: docs-only deprecation of res.writeHeader()

Doc-only deprecation of the undocumented res.writeHeader() API.
Also makes res.writeHeader an alias of res.writeHead since the
previous implementation simply deferred to that method.

PR-URL: https://github.com/nodejs/node/pull/11355
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
James M Snell committed 2017-02-24 18:05:52 -08:00
1 parent d4e1eaf43c
commit fb71ba4921
2 files changed
+13 -3

No files matched your search

+2 -3
View File
@@ -231,9 +231,8 @@ function writeHead(statusCode, reason, obj) {
this._storeHeader(statusLine, headers);
}
ServerResponse.prototype.writeHeader = function writeHeader() {
this.writeHead.apply(this, arguments);
};
// Docs-only deprecated: DEP0063
ServerResponse.prototype.writeHeader = ServerResponse.prototype.writeHead;
function Server(requestListener) {