Skip to main content
OutgoingMessage.prototype.setHeader - node__http.d.ts - Node documentation
method OutgoingMessage.prototype.setHeader

Usage in Deno

```typescript import { OutgoingMessage } from "node:node__http.d.ts"; ```
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