Skip to main content
Http2Stream.close - node__http2.d.ts - Node documentation
method Http2Stream.close

Usage in Deno

```typescript import { type Http2Stream } from "node:node__http2.d.ts"; ```
Http2Stream.close(
code?: number,
callback?: () => void,
): void
Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the connected HTTP/2 peer.

Parameters

optional
code: number = http2.constants.NGHTTP2_NO_ERROR
Unsigned 32-bit integer identifying the error code.
optional
callback: () => void
An optional function registered to listen for the `'close'` event.

Return Type

void