import { HttpResponse } from '../types.js'; import { Request } from './request.js'; /** * Interface for HTTP client adapters. * Defines the contract for sending HTTP requests and streaming responses. */ interface HttpAdapter { send(): Promise; stream(): AsyncGenerator; } /** * Fetch API-based HTTP adapter for executing requests. * Uses the native Fetch API to provide a consistent interface for both regular and streaming requests. * Handles headers, cookies, timeouts with AbortSignal, and error responses. * * @template T - The expected response type */ export declare class RequestFetchAdapter implements HttpAdapter { private request; private requestInit; constructor(request: Request); /** * Executes the HTTP request and returns the response. * Fetches the full response body as an ArrayBuffer. * * @returns A promise resolving to the HTTP response with metadata and body */ send(): Promise>; /** * Executes the HTTP request as a stream, yielding chunks as they arrive. * Uses the Fetch API's ReadableStream and LineDecoder to split into lines. * * @returns An async generator yielding HTTP response chunks * @throws Error if responseHeaders is enabled (streaming not supported with responseHeaders) */ stream(): AsyncGenerator>; private setMethod; private setBody; private setHeaders; private setCookies; private setTimeout; private getHeaders; private toArrayBuffer; } export {}; //# sourceMappingURL=request-fetch-adapter.d.ts.map