UNPKG

@whatwg-node/node-fetch

Version:

Fetch API implementation for Node

6 lines (5 loc) 616 B
import { fetchNodeHttp } from './fetchNodeHttp.js'; import { PonyfillRequest, RequestPonyfillInit } from './Request.js'; import { PonyfillResponse } from './Response.js'; 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>>;