end

open override fun end(cb: () -> Unit)(source)

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.

Since

v8.4.0


open override fun end(data: String, cb: () -> Unit)(source)
open override fun end(data: Uint8Array<*>, cb: () -> Unit)(source)
open override fun end(str: String, encoding: BufferEncoding, cb: () -> Unit)(source)
fun end(str: Uint8Array<*>, encoding: BufferEncoding, cb: () -> Unit = definedExternally)(source)