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 May 4, 2019. It is now read-only.
The restful.js library publishes two versions: dist/restful.js and dist/restul.standalone.js (although it's quite confusing that build/restful.standalone.js creates dist/restful.js and build.restful.fetch.js creates dist/restful.standalone.js).
The restful.js file exports the straight restful factory function which requires an httpBackend. The problem is that build/restful.standalone.js doesn't export fetchBackend and requestBackend. Therefore, it doesn't seem the distribution files actually support making a call like the one from the docs:
const api = restful('http://api.example.com', fetchBackend(fetch));
I've tested this with RequireJS and there doesn't seem to be a way to actually get to the fetchBackend() function.
define('restful', ['./Scripts/restful/restful..js'], function (export) {
// export is equal to function(baseUrl, httpBackend)
// there is no export.fetchBackend to expose to AMD modules using require
return restful;
});
Perhaps this is by design, but because of #96 I'd like to be able to pass an instance of httpBackend with a patched version of fetch so that I can create my own interceptors.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The restful.js library publishes two versions: dist/restful.js and dist/restul.standalone.js (although it's quite confusing that build/restful.standalone.js creates dist/restful.js and build.restful.fetch.js creates dist/restful.standalone.js).
The restful.js file exports the straight restful factory function which requires an httpBackend. The problem is that build/restful.standalone.js doesn't export fetchBackend and requestBackend. Therefore, it doesn't seem the distribution files actually support making a call like the one from the docs:
const api = restful('http://api.example.com', fetchBackend(fetch));
I've tested this with RequireJS and there doesn't seem to be a way to actually get to the fetchBackend() function.
Perhaps this is by design, but because of #96 I'd like to be able to pass an instance of httpBackend with a patched version of fetch so that I can create my own interceptors.
The text was updated successfully, but these errors were encountered: