FlareResponse
class FlareResponseOutbound response value returned by Flare handlers and helper methods.
Discriminated on body type so the constructor selects the right Content-Type
and Content-Length up front. JSON bodies keep their object form on
jsonBody until the per-status serializer runs, at which point
[FINALIZE_JSON_BODY] writes the serialized payload to body and
updates Content-Length.
How you get one
Section titled “How you get one”new FlareResponse(status)
Constructor
Section titled “Constructor”4 overloads
new FlareResponse(status: number): FlareResponsestatus number
new FlareResponse(status: number, body: JsonValue, init?: ResponseInit): FlareResponsestatus number
body JsonValue
init? ResponseInit
new FlareResponse(status: number, body: Uint8Array, init?: ResponseInit): FlareResponsestatus number
body Uint8Array
init? ResponseInit
new FlareResponse(status: number, body: AsyncIterable<Uint8Array>, init?: ResponseInit): FlareResponsestatus number
body AsyncIterable<Uint8Array>
init? ResponseInit
Properties
Section titled “Properties”bodyStream
Section titled “bodyStream”bodyStream: AsyncIterable<Uint8Array> | nullheaders
Section titled “headers”headers: ResponseHeadersstatus
Section titled “status”status: numberAccessors
Section titled “Accessors”get body(): string | Uint8Array | nullreturns string | Uint8Array | null
jsonBody
Section titled “jsonBody”get jsonBody(): JsonValuereturns JsonValue
Learn: Overview