Skip to main content

setHeader

method OutgoingMessage.prototype.setHeader
Jump to headingOutgoingMessage.prototype.setHeader(
name: string,
value:
number
| string
| readonly string[]
,
): this

Sets a single header value. If the header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings to send multiple headers with the same name.

Parameters Jump to heading

Jump to headingname: string

Header name

Jump to headingvalue:
number
| string
| readonly string[]

Header value

Return Type Jump to heading

this
Back to top