-
Notifications
You must be signed in to change notification settings - Fork 20
Description
In rdflib, when a fetcher is defined, there is the possibility for users to define their own fetch method. This can happen with an option when creating the fetcher e.g. fetcher = $rdf.fetcher( store , { fetch : fetch_method }) OR it can be overridden by the user/app by setting a global or window variable in the app to define a different fetch method. This is key for using rdflib outside a browser because we need to define a file-based fetch method but is also needed for example if someone writes a fetch method for Dropbox or other storage.
Currently the global variable to override fetch is named window.solidFetcher. This is wrong - fetcher is the object, fetch is the method and this variable overrides the method, not the object. So that needs changing in rdflib to look for window.solidFetch instead of window.solidFetcher. I guess, for legacy we should support both?
And, we need to allow this user override every place we manually define a new fetcher rather than calling rdflib's method of creating a fetcher. This happens in solid-logic where a fetcher is created using either a hard-coded solid-authn-js fetch method or the window.fetch method. It needs to be modified to accept a user-defined window.solidFetch (OR global.solidFetch in out-of-browser) method. In addition, solid-logic also uses "fetcher" when it means "fetch" so it needs to be changed there too.