import { RequestGlobalsBlobLike } from "./shared.mjs"; import { URLPolyfill } from "./url.mjs"; import { FormDataPolyfill } from "./web.mjs"; //#region src/http.d.ts type HeaderRecord = Record; declare class HeadersPolyfill { private readonly store; constructor(init?: unknown); append(key: string, value: string): void; set(key: string, value: string): void; get(key: string): string | null; getSetCookie(): string[]; has(key: string): boolean; delete(key: string): void; forEach(callback: (value: string, key: string) => void): void; entries(): ArrayIterator<[string, string]>; keys(): ArrayIterator; values(): ArrayIterator; [Symbol.iterator](): ArrayIterator<[string, string]>; } type RequestBodyLike = string | ArrayBuffer | ArrayBufferView | Blob | RequestGlobalsBlobLike | FormData | FormDataPolyfill | null | undefined; declare function getRequestBodyValue(request?: RequestPolyfill): RequestBodyLike; declare class RequestPolyfill { readonly url: string; readonly method: string; readonly headers: HeadersPolyfill; readonly signal: AbortSignal | null; readonly [Symbol.toStringTag] = "Request"; constructor(input: string | URL | URLPolyfill | RequestPolyfill, init?: Record); get body(): ReadableStream | null; get bodyUsed(): boolean; arrayBuffer(): Promise; text(): Promise; clone(): RequestPolyfill; } declare class ResponsePolyfill { readonly headers: HeadersPolyfill; readonly status: number; readonly statusText: string; readonly ok: boolean; readonly url: string; readonly redirected = false; readonly type: ResponseType; readonly [Symbol.toStringTag] = "Response"; constructor(body?: RequestBodyLike, init?: Record); static error(): ResponsePolyfill; static json(data: unknown, init?: Record): ResponsePolyfill; get body(): ReadableStream | null; get bodyUsed(): boolean; arrayBuffer(): Promise; blob(): Promise; formData(): Promise; json(): Promise; text(): Promise; clone(): ResponsePolyfill; } declare function headersToObject(headers: HeadersPolyfill | Headers): HeaderRecord; //#endregion export { HeadersPolyfill, RequestPolyfill, ResponsePolyfill, getRequestBodyValue, headersToObject };