outgoingMessage.appendHeader(name, value)


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

如果值为数组,则相当于多次调用该方法。

如果标头没有先前的值,则这相当于调用 outgoingMessage.setHeader(name, value)

根据创建客户端请求或服务器时 options.uniqueHeaders 的值,这将导致标头多次发送或单次发送,并使用 ; 连接值。

Append a single header value for the header object.

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

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

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 ; .