Closed balmas closed 6 years ago
For https://github.com/alpheios-project/components/issues/147 we need the ability to execute the morph-client calls in node.js environment. The window.fetch method is not available there.
window.fetch
I would like to be able to keep using window.fetch when we have it, to avoid unnecessary runtime dependencies on 3rd party libraries, but to fallback to an alternative method, such as using the axios library, when window.fetch isn't available.
This was implemented with #21
For https://github.com/alpheios-project/components/issues/147 we need the ability to execute the morph-client calls in node.js environment. The
window.fetch
method is not available there.I would like to be able to keep using
window.fetch
when we have it, to avoid unnecessary runtime dependencies on 3rd party libraries, but to fallback to an alternative method, such as using the axios library, whenwindow.fetch
isn't available.