remove node-fetch as runtime dependency

This commit is contained in:
mrjvs
2023-09-27 19:10:32 +02:00
parent de63979e4d
commit 9e2bfedb79
4 changed files with 29 additions and 9 deletions

View File

@@ -1,10 +1,9 @@
import fetch from 'node-fetch';
import { serializeBody } from '@/fetchers/body';
import { makeFullUrl } from '@/fetchers/common';
import { FetchType } from '@/fetchers/fetch';
import { Fetcher } from '@/fetchers/types';
export function makeStandardFetcher(f: typeof fetch): Fetcher {
export function makeStandardFetcher(f: FetchType): Fetcher {
const normalFetch: Fetcher = async (url, ops) => {
const fullUrl = makeFullUrl(url, ops);
const seralizedBody = serializeBody(ops.body);