-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fetch only takes a string, not a UrlWithLegacySupport #74
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
[email protected] works, 48.0.0 does not, so I suspect ipfs/js-ipfs#3351 |
Do I need to cross-post in the other repo, because it does not seem to be a utils issue? |
I can't replicate this, and we have lots of tests that run with the HTTP client, but you are quite right, the fetch docs say the first argument should be a string and not a URL. Could you create a PR to this module that just calls |
Done |
In https://github.com/ipfs/js-ipfs-utils/blob/master/src/http.js#L134-L159 the call to make is put into iso-url which returns a UrlWithLegacySupport.
A few lines lower, this is passed into fetch.
This throws the following error:
Changing the fetch call to the following fixes this, but I'm wondering how this code has been in use in this repo for a long time and suddenly it starts erroring out for me.
I tried Node 12 and 14, no difference there. (I was hoping url.parse was changed)
The text was updated successfully, but these errors were encountered: