Aller au contenu
Français

HttpRequest

Ce contenu n’est pas encore disponible dans votre langue.

Defined in: src/http/types.ts:9

readonly body: Uint8Array<ArrayBufferLike> | null

Defined in: src/http/types.ts:17

Raw bytes of the request body (undefined for GET / HEAD).


readonly headers: Readonly<Record<string, string>>

Defined in: src/http/types.ts:12


readonly method: HttpMethod

Defined in: src/http/types.ts:10


readonly params: Readonly<Record<string, string>>

Defined in: src/http/types.ts:15

Path parameters extracted from /users/:id patterns.


readonly path: string

Defined in: src/http/types.ts:11


readonly query: Readonly<Record<string, string | string[] | undefined>>

Defined in: src/http/types.ts:13


readonly optional remoteAddress?: string

Defined in: src/http/types.ts:26

Optional remote IP address of the client as the server saw it (NOT the value of x-forwarded-for — that’s a header the client can spoof unless a trusted proxy stripped + replaced it). Backends SHOULD populate this from the underlying socket peer; consumers that need to trust a forwarded header MUST do so explicitly (see IpAllowlist’s getClientIp option).