OutgoingMessage.prototype.setHeader - Node documentation
method OutgoingMessage.prototype.setHeader

Usage in Deno

import { OutgoingMessage } from "node:http";
OutgoingMessage.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

name: string

Header name

value:
number
| string
| readonly string[]

Header value

Return Type

this