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

Usage in Deno

```typescript import { OutgoingMessage } from "node:node__http.d.ts"; ```
OutgoingMessage.prototype.flushHeaders(): void
Flushes the message headers. For efficiency reason, Node.js normally buffers the message headers until `outgoingMessage.end()` is called or the first chunk of message data is written. It then tries to pack the headers and data into a single TCP packet. It is usually desired (it saves a TCP round-trip), but not when the first data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message.

Return Type

void