diff --git a/packages/node/src/lib/customhttpclient.ts b/packages/node/src/lib/customhttpclient.ts deleted file mode 100644 index 48970a5e6..000000000 --- a/packages/node/src/lib/customhttpclient.ts +++ /dev/null @@ -1,20 +0,0 @@ -export interface CustomHTTPClient { - send: (resource: any, options: any) => Promise -} - -export class DefaultFetchClient implements CustomHTTPClient { - send = async (resource: any, options: any): Promise => { - if (globalThis.fetch) { - return globalThis.fetch(resource, options) - } // @ts-ignore - // This guard causes is important, as it causes dead-code elimination to be enabled inside this block. - else if (typeof EdgeRuntime !== 'string') { - // @ts-ignore - return (await import('node-fetch')).default(payload, options) as Response - } else { - throw new Error( - 'Invariant: an edge runtime that does not support fetch should not exist' - ) - } - } -}