Skip to content

HttpOutgoingResponse

HttpOutgoingResponse = HttpOutgoingContent_ & object

Defined in: packages/net-http/src/message/http-message.ts:104

A response, as a server handler returns it.

readonly status: number

A final status: 2xx to 5xx, or 101 together with tunnel.

readonly optional tunnel?: (transport) => void

Accepts a protocol switch: once the response head is sent, the connection (HTTP/1.x, with status 101) or stream (HTTP/2, HTTP/3, with a 2xx to an extended CONNECT) is handed over as a Transport, and stops being HTTP. Without it, a 101 is refused as a handler error.

Transport

void