Skip to main content
Http2ServerRequest.prototype.once - node__http2.d.ts - Node documentation
method Http2ServerRequest.prototype.once

Usage in Deno

```typescript import { Http2ServerRequest } from "node:node__http2.d.ts"; ```
Http2ServerRequest.prototype.once(
event: "aborted",
listener: (
hadError: boolean,
code: number,
) => void
,
): this

Parameters

event: "aborted"
listener: (
hadError: boolean,
code: number,
) => void

Return Type

this
Http2ServerRequest.prototype.once(
event: "close",
listener: () => void,
): this

Parameters

event: "close"
listener: () => void

Return Type

this
Http2ServerRequest.prototype.once(
event: "data",
listener: (chunk: Buffer | string) => void,
): this

Parameters

event: "data"
listener: (chunk: Buffer | string) => void

Return Type

this
Http2ServerRequest.prototype.once(
event: "end",
listener: () => void,
): this

Parameters

event: "end"
listener: () => void

Return Type

this
Http2ServerRequest.prototype.once(
event: "readable",
listener: () => void,
): this

Parameters

event: "readable"
listener: () => void

Return Type

this
Http2ServerRequest.prototype.once(
event: "error",
listener: (err: Error) => void,
): this

Parameters

event: "error"
listener: (err: Error) => void

Return Type

this
Http2ServerRequest.prototype.once(
event: string | symbol,
listener: (...args: any[]) => void,
): this

Parameters

event: string | symbol
listener: (...args: any[]) => void

Return Type

this