Skip to main content

Class: UWSRequest

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

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:100

Parameters

uwsReq

HttpRequest

remoteAddress?

string

Returns

UWSRequest

Properties

authPayload?

optional authPayload?: any

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

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:96

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:89

Implementation of

HttpRequest.body


cookies

readonly cookies: Record<string, string>

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

Implementation of

HttpRequest.cookies


headers

readonly headers: Record<string, string>

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

Implementation of

HttpRequest.headers


method

readonly method: string

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

Implementation of

HttpRequest.method


params

params: Record<string, string> = {}

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

Implementation of

HttpRequest.params


path

readonly path: string

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

Implementation of

HttpRequest.path


query

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

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

Implementation of

HttpRequest.query


rawBody?

optional rawBody?: Buffer<ArrayBufferLike>

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

Implementation of

HttpRequest.rawBody


signedCookies

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

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

Implementation of

HttpRequest.signedCookies


socket

readonly socket: object

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

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:84

Implementation of

HttpRequest.url


user?

optional user?: any

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

Set by JWT auth middleware after successful token verification.

Implementation of

HttpRequest.user