Skip to main content
method OutgoingMessage.prototype.appendHeader
OutgoingMessage.prototype.appendHeader(
name: string,
value: string | readonly string[],
): this
Deprecated

Append a single header value to the header object.

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

If there were no previous values for the header, this is equivalent to 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 ; .

Parameters

name: string

Header name

value: string | readonly string[]

Header value

Return Type

this
Back to top