UNPKG

@ceramicnetwork/common

Version:
16 lines 629 B
export declare type FetchOpts = Partial<{ body: any; method: HttpMethod; headers: any; timeout: number; signal: AbortSignal; }>; export declare type FetchRequestParams = { url: URL | string; opts?: FetchOpts; }; export declare type FetchRequest = (url: URL | string, opts?: FetchOpts) => Promise<any>; export declare type RFC9110Methods = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE'; export declare type HttpMethod = RFC9110Methods; export declare function fetchJson(url: URL | string, opts?: Partial<FetchOpts>): Promise<any>; //# sourceMappingURL=fetch-json.d.ts.map