UNPKG

@whatwg-node/node-fetch

Version:

Fetch API implementation for Node

6 lines (5 loc) 619 B
import { fetchNodeHttp } from './fetchNodeHttp.cjs'; import { PonyfillRequest, RequestPonyfillInit } from './Request.cjs'; import { PonyfillResponse } from './Response.cjs'; export declare function createFetchPonyfill(fetchFn: typeof fetchNodeHttp): <TResponseJSON = any, TRequestJSON = any>(info: string | PonyfillRequest<TRequestJSON> | URL, init?: RequestPonyfillInit) => Promise<PonyfillResponse<TResponseJSON>>; export declare function fetchPonyfill<TResponseJSON = any, TRequestJSON = any>(info: string | PonyfillRequest<TRequestJSON> | URL, init?: RequestPonyfillInit): Promise<PonyfillResponse<TResponseJSON>>;