import * as plugins from './plugins.js'; import * as types from './types.js'; import { CoreResponse as AbstractCoreResponse } from '../core_base/response.js'; /** * Node.js implementation of Core Response class that provides a fetch-like API */ export declare class CoreResponse extends AbstractCoreResponse implements types.INodeResponse { private incomingMessage; private bodyBufferPromise; private _autoDrainTimeout; readonly ok: boolean; readonly status: number; readonly statusText: string; readonly headers: plugins.http.IncomingHttpHeaders; readonly url: string; constructor(incomingMessage: plugins.http.IncomingMessage, url: string, options?: types.ICoreRequestOptions); /** * Override to also cancel auto-drain when body is consumed */ protected ensureNotConsumed(): void; /** * Collects the body as a buffer */ private collectBody; /** * Parse response as JSON */ json(): Promise; /** * Get response as text */ text(): Promise; /** * Get response as ArrayBuffer */ arrayBuffer(): Promise; /** * Get response as a web-style ReadableStream */ stream(): ReadableStream | null; /** * Get the raw IncomingMessage (for legacy compatibility) */ raw(): plugins.http.IncomingMessage; }