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

Usage in Deno

```typescript import { OutgoingMessage } from "node:node__http.d.ts"; ```
OutgoingMessage.prototype.hasHeader(name: string): boolean
Returns `true` if the header identified by `name` is currently set in the outgoing headers. The header name is case-insensitive. ```js const hasContentType = outgoingMessage.hasHeader('content-type'); ```

Parameters

name: string

Return Type

boolean