Skip to content

HttpRequestHead

HttpRequestHead = object

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

The request line, in the version-neutral form HTTP/2 and HTTP/3 carry as pseudo-header fields (RFC 9113 §8.3.1).

scheme and path are null only for CONNECT, whose target is just an authority. authority is null only for an HTTP/1.0 request sent without Host. path is "*" for a server-wide OPTIONS, and otherwise starts with / and keeps its query, undecoded.

readonly authority: string | null

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


readonly headers: HttpHeaders

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

The header section. On HTTP/1.x it still holds Host and the connection-level fields (Connection, Transfer-Encoding, Upgrade).


readonly method: string

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


readonly path: string | null

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


readonly protocol: string | null

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

The protocol an extended CONNECT asks to tunnel (RFC 8441, RFC 9220): "websocket" for WebSocket over HTTP/2 or HTTP/3. Always null over HTTP/1.x, where Upgrade plays that role.


readonly scheme: string | null

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