import "@bacons/text-decoder/install"; import { type RequestMethods as RequestMethod, type RequestRedirection } from "./specs/fetch.nitro"; import { ReadableStream } from "web-streams-polyfill"; export interface RequestInit { body?: ReadableStream | Blob | File | string | undefined; /** * Any headers you want to add to your request, contained within an object literal * whose keys are the names of headers and whose values are the header values. */ headers?: Headers | Record; method?: RequestMethod; /** * Determines RN's behavior in case the server replies with a redirect status (`300..399`). * @default 'follow' */ redirect?: RequestRedirection; } export declare class Request { readonly url: string; readonly body: ReadableStream | undefined; readonly method: RequestMethod; /** * Determines RN's behavior in case the server replies with a redirect status (`300..399`). * @default 'follow' */ readonly redirect: RequestRedirection; /** * Any headers you want to add to your request, contained within an object literal * whose keys are the names of headers and whose values are the header values. */ readonly headers: Record; constructor(input: string | URL, init?: RequestInit); } export declare function fetch(input: string | URL, init?: RequestInit): Promise<{ status: number; statusText: string; headers: Headers; bytes: () => Promise; json: () => Promise; text: () => Promise; arrayBuffer: () => Promise; type: string; url: string; ok: boolean; redirected: boolean; }>; //# sourceMappingURL=index.d.ts.map