lquixada / cross-fetch

Universal WHATWG Fetch API for Node, Browsers and React Native.
MIT License
1.67k stars 104 forks source link

[Question] Cloudflare Workers Support #82

Closed giacomolm closed 3 years ago

giacomolm commented 3 years ago

Hi, I am testing - indirectly - the cross-fetch library on CloudFlare Workers and I get the following error:

'XMLHttpRequest is not defined'

Are you planning to support CF workers in the near future ?

Please note that node-fetch seems to work with CF, but I couldn't find any "official" statement .

TIA

lquixada commented 3 years ago

Not familiar with CloudFlare Workers but the purpose of cross-fetch is just to act as a proxy for both node-fetch and whatwg-fetch. If the environment lacks the XMLHttpRequest object, maybe a polyfill for that could help you out.

lquixada commented 3 years ago

I'm closing this as it seems a duplicate of #69 .