Skip to main content

Class: UWSRequest

Defined in: service-core/src/http/uWS/Adapters.ts:111

Adapts a uWS HttpRequest to the framework-agnostic HttpRequest interface.

IMPORTANT: uWS HttpRequest is stack-allocated and only valid during the synchronous portion of the handler. All request data MUST be captured in the constructor before any await.

Implements​

Indexable​

[key: string]: any

Allow arbitrary per-request properties (websocket, wsHandled, etc.)

Constructors​

Constructor​

new UWSRequest(uwsReq, remoteAddress?): UWSRequest

Defined in: service-core/src/http/uWS/Adapters.ts:129

Parameters​

uwsReq​

HttpRequest

remoteAddress?​

string

Returns​

UWSRequest

Properties​

authPayload?​

optional authPayload?: any

Defined in: service-core/src/http/uWS/Adapters.ts:124

Full decoded JWT payload, set by JWT auth middleware.

Implementation of​

HttpRequest.authPayload


authToken?​

optional authToken?: string

Defined in: service-core/src/http/uWS/Adapters.ts:125

Raw JWT token string, set by JWT auth middleware.

Implementation of​

HttpRequest.authToken


body​

body: any = undefined

Defined in: service-core/src/http/uWS/Adapters.ts:118

Implementation of​

HttpRequest.body


cookies​

readonly cookies: Record<string, string>

Defined in: service-core/src/http/uWS/Adapters.ts:120

Implementation of​

HttpRequest.cookies


headers​

readonly headers: Record<string, string>

Defined in: service-core/src/http/uWS/Adapters.ts:115

Implementation of​

HttpRequest.headers


method​

readonly method: string

Defined in: service-core/src/http/uWS/Adapters.ts:112

Implementation of​

HttpRequest.method


params​

params: Record<string, string> = {}

Defined in: service-core/src/http/uWS/Adapters.ts:116

Implementation of​

HttpRequest.params


path​

readonly path: string

Defined in: service-core/src/http/uWS/Adapters.ts:114

Implementation of​

HttpRequest.path


query​

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

Defined in: service-core/src/http/uWS/Adapters.ts:117

Implementation of​

HttpRequest.query


rawBody?​

optional rawBody?: Buffer<ArrayBufferLike>

Defined in: service-core/src/http/uWS/Adapters.ts:119

Implementation of​

HttpRequest.rawBody


signedCookies​

readonly signedCookies: Record<string, string> = {}

Defined in: service-core/src/http/uWS/Adapters.ts:121

Implementation of​

HttpRequest.signedCookies


socket​

readonly socket: object

Defined in: service-core/src/http/uWS/Adapters.ts:122

Minimal socket interface; populated with remote address for IP extraction.

remoteAddress?​

optional remoteAddress?: string

Implementation of​

HttpRequest.socket


url​

readonly url: string

Defined in: service-core/src/http/uWS/Adapters.ts:113

Implementation of​

HttpRequest.url


user?​

optional user?: any

Defined in: service-core/src/http/uWS/Adapters.ts:123

Set by JWT auth middleware after successful token verification.

Implementation of​

HttpRequest.user