You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
From what I can tell right now implementation chooses between http / https modules to do network request. In browser case however it would be very useful to allow passing custom fetch that would perform it in the origin that has permission to talk to daemon.
However it's not as simple as just adding config.fetch as implementation assumes node (polyfill) which complicates things.
The text was updated successfully, but these errors were encountered:
This PR enabled pubsub in the browser and paves the way for a switch to using `fetch` by default and allowing for cancelable requests via the use of `AbortController`.
It's mostly the work done in ipfs-shipyard/js-ipfs-http-client-lite#1 but adapted a bit for use here.
If approved, we can start work moving the other commands to use `fetch`. The work in https://github.com/ipfs-shipyard/js-ipfs-http-client-lite has proven the hard parts (uploading files) are all possible using the `fetch` API.
Since `fetch` is promise based, when moving the other commands it makes sense to just switch to async/await as per ipfs/js-ipfs#1670 (and callbackify instead of promisify).
Depends on:
* [x] ipfs-inactive/interface-js-ipfs-core#505resolves#518
refs ipfs/js-ipfs#2093resolves#932
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From what I can tell right now implementation chooses between http / https modules to do network request. In browser case however it would be very useful to allow passing custom
fetch
that would perform it in the origin that has permission to talk to daemon.However it's not as simple as just adding
config.fetch
as implementation assumes node (polyfill) which complicates things.The text was updated successfully, but these errors were encountered: