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

Please consider using fetch instead of XMLHttpRequest #29

Closed
fishcakeday opened this issue May 12, 2023 · 4 comments
Closed

Please consider using fetch instead of XMLHttpRequest #29

fishcakeday opened this issue May 12, 2023 · 4 comments

Comments

@fishcakeday
Copy link

All modern browsers support fetch, and using XMLHttpRequest is no longer necessary. This will also make the tools compatible with the edge environments (e.g., Cloudflare Workers).

@bumi
Copy link
Contributor

bumi commented May 12, 2023

hmmm, we only use fetch where do you see XMLHttpRequest being used?

We use cross-fetch for node backwards compatibility. Is that maybe an issue? 🤔

@fishcakeday
Copy link
Author

Sorry, I should have checked the code first. Yes, you are right, it is an issue with cross-fetch. Found an old one on their GitHub repo: lquixada/cross-fetch#69

I am not sure what would be the optimal solution here. For now, I am unable to use alby-tools in cloudflare workers.

@fishcakeday
Copy link
Author

After reading through the cross-fetch repo, it doesn't seem that the project is maintained. Would you consider moving to https://www.npmjs.com/package/@inrupt/universal-fetch instead. Thanks.

@rolznz
Copy link
Contributor

rolznz commented Jun 5, 2023

Fixed in #32

Thanks @fishcakeday !

@rolznz rolznz closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants