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

Usage

import { OutgoingMessage } from "node:http";

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