outgoingMessage.appendHeader(name, value)


为标头对象附加单一个标头值。

🌐 Append a single header value for the header object.

如果值是数组,这相当于多次调用此方法。

🌐 If the value is an array, this is equivalent of calling this method multiple times.

如果该头部之前没有值,这相当于调用 outgoingMessage.setHeader(name, value)

🌐 If there were no previous value for the header, this is equivalent of calling outgoingMessage.setHeader(name, value).

根据 options.uniqueHeaders 的值,当客户端请求或服务器创建时,最终会导致该头部被发送多次,或者只发送一次且其值使用 ; 连接。

🌐 Depending of the value of options.uniqueHeaders when the client request or the server were created, this will end up in the header being sent multiple times or a single time with values joined using ; .