Closed duro closed 8 years ago
The provided methods call into the fetch
global. How would you use a different library? If you e.g. override HttpStateSource#request
, then you would indeed lose the hooks.
OK, so what you are saying is that it is ill advised to use a different library, and the github/fetch and matthew-andrews/isomorphic-fetch libraries are pretty hard dependencies of the Marty framework.
As mentioned on Gitter, you're not directly using they - they get pulled in as dependencies by Marty, and e.g. this.get
and this.post
on HttpStateSource
internally use a fetch
polyfill.
If needed, you can override HttpStateSource#request
, but otherwise you won't be directly calling fetch
.
...or can I use a different HTTP request library? If I do, will I loose the hook functionality?