FlareRequest
class FlareRequestPure inbound representation of an HTTP request.
Carries only what arrived on the wire: method, URL, headers, raw body access,
and adapter-derived primitives like the abort signal. Pipeline-scoped state
(request state, parsed contract data, response serializers, outbound cookies)
lives on FlareHttpContext, which wraps a FlareRequest and is what
controllers, middleware, and handler functions actually receive.
How you get one
Section titled “How you get one”Handed to you by the framework; see Requests.
Properties
Section titled “Properties”method
Section titled “method”method: stringnativeRequest
Section titled “nativeRequest”nativeRequest: unknownrequestId
Section titled “requestId”requestId: stringstartTime
Section titled “startTime”startTime: numberurl: stringAccessors
Section titled “Accessors”headers
Section titled “headers”get headers(): Headersreturns Headers
get path(): stringreturns string
rawBody
Section titled “rawBody”get rawBody(): ArrayBuffer | nullreturns ArrayBuffer | null
rawQueryParams
Section titled “rawQueryParams”get rawQueryParams(): URLSearchParamsreturns URLSearchParams
rawRouteParams
Section titled “rawRouteParams”get rawRouteParams(): Record<string, string>returns Record<string, string>
signal
Section titled “signal”get signal(): AbortSignalreturns AbortSignal
Methods
Section titled “Methods”buffer()
Section titled “buffer()”buffer(maxBytes?: number): Promise<ArrayBuffer | null>maxBytes? number
returns Promise<ArrayBuffer | null>
json()
Section titled “json()”json(): Promise<JsonValue>returns Promise<JsonValue>
stream()
Section titled “stream()”stream(): AsyncIterable<Uint8Array>Iterates the native inbound body without buffering through buffer.
returns AsyncIterable<Uint8Array>
Throws:
When buffer, text, or json has already started or finished reading the body. Pick one read strategy per request.
text()
Section titled “text()”text(): Promise<string | null>returns Promise<string | null>
Learn: Requests