Class: BunRequest
Defined in: service-core/src/http/bun/BunAdapters.ts:28
Adapts a Bun/Fetch API Request to the framework-agnostic HttpRequest interface.
Unlike uWS's stack-allocated request, a Fetch API Request stays valid across await, so there
is no urgency to capture everything synchronously in the constructor the way UWSRequest must —
this is done here purely for parity/simplicity, not correctness.
Implements
Indexable
[
key:string]:any
Allow arbitrary per-request properties (websocket, wsHandled, etc.)
Constructors
Constructor
new BunRequest(
req,server):BunRequest
Defined in: service-core/src/http/bun/BunAdapters.ts:46
Parameters
req
Request
server
RequestIPSource
Returns
BunRequest
Properties
authPayload?
optionalauthPayload?:any
Defined in: service-core/src/http/bun/BunAdapters.ts:41
Full decoded JWT payload, set by JWT auth middleware.
Implementation of
authToken?
optionalauthToken?:string
Defined in: service-core/src/http/bun/BunAdapters.ts:42
Raw JWT token string, set by JWT auth middleware.
Implementation of
body
body:
any=undefined
Defined in: service-core/src/http/bun/BunAdapters.ts:35
Implementation of
cookies
readonlycookies:Record<string,string>
Defined in: service-core/src/http/bun/BunAdapters.ts:37
Implementation of
headers
readonlyheaders:Record<string,string>
Defined in: service-core/src/http/bun/BunAdapters.ts:32
Implementation of
method
readonlymethod:string
Defined in: service-core/src/http/bun/BunAdapters.ts:29
Implementation of
params
params:
Record<string,string> ={}
Defined in: service-core/src/http/bun/BunAdapters.ts:33
Implementation of
path
readonlypath:string
Defined in: service-core/src/http/bun/BunAdapters.ts:31
Implementation of
query
readonlyquery:Record<string,string|string[]>
Defined in: service-core/src/http/bun/BunAdapters.ts:34
Implementation of
rawBody?
optionalrawBody?:Buffer<ArrayBufferLike>
Defined in: service-core/src/http/bun/BunAdapters.ts:36
Implementation of
signedCookies
readonlysignedCookies:Record<string,string> ={}
Defined in: service-core/src/http/bun/BunAdapters.ts:38
Implementation of
socket
readonlysocket:object
Defined in: service-core/src/http/bun/BunAdapters.ts:39
Minimal socket interface; populated with remote address for IP extraction.
remoteAddress?
optionalremoteAddress?:string
Implementation of
url
readonlyurl:string
Defined in: service-core/src/http/bun/BunAdapters.ts:30
Implementation of
user?
optionaluser?:any
Defined in: service-core/src/http/bun/BunAdapters.ts:40
Set by JWT auth middleware after successful token verification.