diff --git a/source/core/constants.ts b/source/core/constants.ts index 62e28084..b3451240 100644 --- a/source/core/constants.ts +++ b/source/core/constants.ts @@ -5,8 +5,9 @@ export const supportsRequestStreams = (() => { let duplexAccessed = false; let hasContentType = false; const supportsReadableStream = typeof globalThis.ReadableStream === 'function'; + const supportsRequest = typeof globalThis.Request === 'function'; - if (supportsReadableStream) { + if (supportsReadableStream && supportsRequest) { hasContentType = new globalThis.Request('https://a.com', { body: new globalThis.ReadableStream(), method: 'POST',