Skip to main content
Http2ServerResponse.prototype.end - http2 - Node documentation
method Http2ServerResponse.prototype.end

Usage in Deno

import { Http2ServerResponse } from "node:http2";
Http2ServerResponse.prototype.end(callback?: () => void): this

This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.

If data is specified, it is equivalent to calling response.write(data, encoding) followed by response.end(callback).

If callback is specified, it will be called when the response stream is finished.

Parameters

optional
callback: () => void

Return Type

this
Http2ServerResponse.prototype.end(
data: string | Uint8Array,
callback?: () => void,
): this

Parameters

data: string | Uint8Array
optional
callback: () => void

Return Type

this
Http2ServerResponse.prototype.end(
data: string | Uint8Array,
encoding: BufferEncoding,
callback?: () => void,
): this

Parameters

data: string | Uint8Array
encoding: BufferEncoding
optional
callback: () => void

Return Type

this
Back to top