This repository was archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 296
Configurable http.request protocol option #66
Labels
Comments
Ahh i see. yeah we should. |
Same problem here. I cherry-picked the protocol line out of ckeenans PR and was able to get it working, thanks ckeenan, would be great for this to be merged. |
Same problem here as well. I'm trying to run |
👍 would love to see it merged |
Is this still an issue with the latest version? (We switched to |
Yes, only could get it working when I forced the protocol to |
@xicombd okay thanks, strange though as I would expect request to take the protocol from the uri |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Running ipfs-api from an on-disk "file:///.../index.html" does not work. Calling http.request without passing a
protocol
in the opts, it will default towindow.location.protocol
. This causes the following error:TypeError: Failed to execute 'fetch' on 'Window': Failed to parse URL from file://127.0.0.1:5001/api/...
see
dist/ipfsapi.js:5837
Could we add a way to explicitly set this protocol option? It could be passed as an opt in the requestAPI or included as a param of IpfsAPI. The latter might be preferable for this scenario so not to require a protocol opt for every method.. maybe it could be IpfsAPI(host_or_multiaddr, port, opts)?
The text was updated successfully, but these errors were encountered: