rss-parser icon indicating copy to clipboard operation
rss-parser copied to clipboard

Use fetch instead of XMLHttpRequest

Open uhthomas opened this issue 1 year ago • 1 comments

I'd be interested in using this with Cloudflare Workers, but it does not work because the platform only has fetch.

uhthomas avatar Jul 07 '24 19:07 uhthomas

You can just fetch it and then use parseString; I'm using this with Cloudflare Workers just fine. That said, I agree with the sentiment that this package isn't providing options for configuring the underlying HTTP interface like pretty much every other API does.

You'll have to add Node compatability to your Wrangler configuration file, and HTTP requests won't work, but you just need it to build, not run the incompatible parts.

  "compatibility_flags": [
    "nodejs_compat"
  ],

Xevion avatar May 24 '25 00:05 Xevion