Interface: RequestWS
Defined in: service-core/src/http/uWS/WebSocket.ts:16
HTTP request type for handling WebSocket upgrade requests.
Extends HttpRequest with WebSocket-specific properties set by the router
after the WebSocket connection is opened.
Extends
Indexable
[
key:string]:any
Allow arbitrary per-request properties (e.g. req.websocket, req.wsHandled).
Properties
authPayload?
optionalauthPayload?:any
Defined in: service-core/src/http/types.ts:59
Full decoded JWT payload, set by JWT auth middleware.
Inherited from
authToken?
optionalauthToken?:string
Defined in: service-core/src/http/types.ts:61
Raw JWT token string, set by JWT auth middleware.
Inherited from
body
body:
any
Defined in: service-core/src/http/types.ts:20
Inherited from
bodyStream?
optionalbodyStream?:Readable
Defined in: service-core/src/http/types.ts:40
The raw request body as a Node Readable stream, populated instead of body/rawBody for a
route registered with { streamingBody: true } (see HttpRouteOptions) — e.g. via the
@StreamingBody() decorator. undefined for every ordinary route, where body/rawBody are
populated as before.
The stream yields Buffer chunks and supports for await (const chunk of req.bodyStream) as
well as .pipe(). Backpressure is enforced end-to-end by both adapters — a slow consumer
throttles how fast bytes are read off the underlying connection rather than buffering
unbounded data in memory — which is the entire point of opting into streaming (e.g. a
multi-GB file upload). The stream is destroyed (with an error) if the client disconnects
mid-upload; a handler consuming it via for await sees that as a thrown error and should
clean up (e.g. delete a partially-written temp file) in a catch/finally.
A streaming route does NOT get the framework's default maxBodySize enforcement — that check
only runs as part of the ordinary buffering path. The handler is responsible for enforcing
whatever size limit makes sense for the route itself.
Inherited from
cookies
cookies:
Record<string,string>
Defined in: service-core/src/http/types.ts:41
Inherited from
headers
headers:
Record<string,string|string[] |undefined>
Defined in: service-core/src/http/types.ts:17
Inherited from
method
method:
string
Defined in: service-core/src/http/types.ts:14
Inherited from
params
params:
Record<string,string>
Defined in: service-core/src/http/types.ts:18
Inherited from
path
path:
string
Defined in: service-core/src/http/types.ts:15
Inherited from
query
query:
Record<string,string|string[]>
Defined in: service-core/src/http/types.ts:19
Inherited from
rawBody?
optionalrawBody?:Buffer<ArrayBufferLike>
Defined in: service-core/src/http/types.ts:21
Inherited from
routePattern?
optionalroutePattern?:string
Defined in: service-core/src/http/types.ts:68
The registered route pattern that matched this request (e.g. /items/:id), set by the router before any
middleware runs. undefined when no application route matched, i.e. the request is handled by the router's
own not-found or CORS preflight fallback. Unlike path, the set of possible values is bounded by the
application's routes, so it is safe to use as a metrics label.
Inherited from
session?
optionalsession?:Record<string,any>
Defined in: service-core/src/http/types.ts:47
Populated by the optional session middleware (see SessionManager). Undefined when no
session middleware is registered (i.e. the session config block is absent).
Inherited from
sessionIsNew?
optionalsessionIsNew?:boolean
Defined in: service-core/src/http/types.ts:53
Set by the session middleware. true when session is not backed by a stored session yet (the request carried
no valid session cookie): nothing is stored and no cookie is sent unless a handler writes to session.
Bookkeeping-only writes (last access time, IP address, ...) should be skipped while this is true.
Inherited from
signedCookies
signedCookies:
Record<string,string>
Defined in: service-core/src/http/types.ts:42
Inherited from
socket
socket:
object
Defined in: service-core/src/http/types.ts:55
Minimal socket interface; populated with remote address for IP extraction.
remoteAddress?
optionalremoteAddress?:string
Inherited from
url
url:
string
Defined in: service-core/src/http/types.ts:16
Inherited from
user?
optionaluser?:JWTUser
Defined in: service-core/src/http/types.ts:57
Set by JWT auth middleware after successful token verification.
Inherited from
websocket
websocket:
IWebSocketShim|undefined
Defined in: service-core/src/http/uWS/WebSocket.ts:20
The WebSocket shim for this connection. Set on open after the upgrade.
wsHandled
wsHandled:
boolean
Defined in: service-core/src/http/uWS/WebSocket.ts:27
Indicates that the WebSocket handler has processed this connection and the
connection should remain open. Set to true by wrapMiddleware when a
decorated handler returns successfully.