Message from JavaScript discussions

September 2017

— No, because map / forEach passes 3 args


Fetch is a browser API, polyfills generally implement APIs that aren't available in older browsers (like promises), in case of these node modules, it means bringing that browser api to node, since node doesn't already have it. Another example is the jsdom module, which tries to implement the DOM API in node

— And what is the Fetch API used for mainly? It's the one that makes the HTTP calls?

— Yep

— HTTP(S) client library

— And it's a GOOD API too

— But for nodejs you also have axios

— And my own simple snippet even:

— (Only does GET atm)

— Heh, axios has a great API

— You should use that

—, data) -> promise<response>
axios.get(url) or axios(url) -> promise<response>