Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Cloudflare Workers #66

Closed
0x62 opened this issue Nov 18, 2021 · 1 comment
Closed

Support for Cloudflare Workers #66

0x62 opened this issue Nov 18, 2021 · 1 comment

Comments

@0x62
Copy link

0x62 commented Nov 18, 2021

Expected Behavior

Builds successfully.

Actual Behavior

Fails.

Steps to Reproduce the Problem

Install on an application running on Cloudflare Workers.

This library fails as it relies on XHR/Axios under the hood, which Cloudflare Workers don't support. My suggestion would be to change requests to use fetch, and provide a configuration option when initialising to supply your own instance of fetch. This could then be used with cross-fetch to support pure Node environments and the 'webworker-ish' environment of CF workers with the same codebase.

This isn't preventing me using it (just wrote my own API wrapper), but it would be nice to have.

@vahnag
Copy link
Contributor

vahnag commented Oct 12, 2022

@0x62 we just released v4.0.0 version of this package with a rewrite under the hood to use fetch instead of axios which will allow it to be used in Workers as well as node environments.

@tk26 tk26 closed this as completed Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants