DEP0066: OutgoingMessage.prototype._headers, OutgoingMessage.prototype._headerNames


类型: 运行时

node:http 模块 OutgoingMessage.prototype._headersOutgoingMessage.prototype._headerNames 属性已弃用。 使用公共方法之一(例如 OutgoingMessage.prototype.getHeader()OutgoingMessage.prototype.getHeaders()OutgoingMessage.prototype.getHeaderNames()OutgoingMessage.prototype.getRawHeaderNames()OutgoingMessage.prototype.hasHeader()OutgoingMessage.prototype.removeHeader()OutgoingMessage.prototype.setHeader())处理传出标头。

OutgoingMessage.prototype._headersOutgoingMessage.prototype._headerNames 属性从未被记录为官方支持的属性。

Type: Runtime

The node:http module OutgoingMessage.prototype._headers and OutgoingMessage.prototype._headerNames properties are deprecated. Use one of the public methods (e.g. OutgoingMessage.prototype.getHeader(), OutgoingMessage.prototype.getHeaders(), OutgoingMessage.prototype.getHeaderNames(), OutgoingMessage.prototype.getRawHeaderNames(), OutgoingMessage.prototype.hasHeader(), OutgoingMessage.prototype.removeHeader(), OutgoingMessage.prototype.setHeader()) for working with outgoing headers.

The OutgoingMessage.prototype._headers and OutgoingMessage.prototype._headerNames properties were never documented as officially supported properties.