Libraries v5.2.0
    Preparing search index...

    Class RequestContext

    Index
    _queryParams?: Record<string, string>

    — overridable for testing

    headers: Record<string, string>
    items: Map<string, unknown> = ...
    maxBodySize: number
    method: string
    principal: unknown = undefined

    The authenticated principal for this request. Set by authentication middleware; typed as unknown at the RequestContext level — handlers receive a fully typed version via ActionContext.principal.

    request: IncomingMessage
    responded: boolean = false
    response: ServerResponse
    url: URL
    • Read once; concurrent readers share the same result or failure.

      Returns Promise<Buffer<ArrayBufferLike>>

    • Read, buffer, and JSON-parse the request body. Result is cached after the first call.

      Returns Promise<unknown>

    • Mark a known terminal cause; a successful response takes precedence.

      Parameters

      • outcome: "timeout" | "cancelled"

      Returns void

    • Internal

      Preserve application failures for completion observers.

      Parameters

      • error: unknown

      Returns void