Interface RequestParams

Context passed to every route handler and middleware.

interface RequestParams {
    body: any;
    headers: Headers;
    matches: MatchResult<any>;
    request: Request;
    state: StateFn;
}

Properties

body: any

Parsed request body (see readRequestBody).

headers: Headers

Incoming request headers.

matches: MatchResult<any>

Route match result from path-to-regexp; matches.params holds route params.

request: Request

The raw incoming request.

state: StateFn

Factory for the Durable Object state accessor.

Generated using TypeDoc