/** * Copyright (c) 2026 AzerothJS. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * A Response that keeps its payload in the shape the adapter will write, so the common path * never round-trips through a stream. It satisfies the full Response interface, so a handler * or middleware holding one cannot tell the difference. */ export declare class PayloadResponse implements Response { #private; constructor(payload: Uint8Array | string, status: number, headerRecord: Record, setCookies?: readonly string[]); /** * The adapter's fast path: everything a socket write needs, no undici. A string payload * is returned AS a string - `res.end(string)` encodes natively during the write, which * beats encoding in JS first. @internal */ raw(): { status: number; headers: Record; payload: Uint8Array | string; }; /** * A new PayloadResponse over the SAME payload with extra headers merged into the record * (later names lowercased; existing names win unless overwritten). Edge middleware use * this to add response headers WITHOUT dropping the adapter fast path - mutating the * `headers` view alone would not reach the record the adapter actually writes. @internal */ withHeaders(extra: Record): PayloadResponse; get status(): number; get ok(): boolean; get statusText(): string; get headers(): Headers; get body(): ReadableStream> | null; get bodyUsed(): boolean; arrayBuffer(): Promise; bytes(): Promise>; text(): Promise; json(): Promise; blob(): Promise; formData(): Promise; clone(): Response; get redirected(): boolean; get type(): ResponseType; get url(): string; }