Skip to content

Call

Defined in: src/server/router.ts:65

Per-request state handed to route handlers.

Type Parameter Default type
Ctx -
Grant never
Property Type Description Defined in
ctx Ctx The product’s context object (RouterOptions.context). src/server/router.ts:72
params Record<string, string> - src/server/router.ts:69
path string The base-path-stripped path. src/server/router.ts:68
principal Principal | null - src/server/router.ts:73
query URLSearchParams - src/server/router.ts:70
request Request - src/server/router.ts:66
scoped Grant | null The scoped-token grant, or null for host principals and anonymous requests. src/server/router.ts:75
body<S>(schema): Promise<InferOutput<S>>;

Defined in: src/server/router.ts:77

Parse + validate the JSON body (an empty body is {}). Memoized.

Type Parameter
S extends GenericSchema
Parameter Type
schema S

Promise<InferOutput<S>>