wrapper for node-fetch with tough-cookie
Motivation
I like the http apis of fetch. They are awesome. And I want to use them.
using node-fetch in node, sadly does not send any header. That is good, so it is giving us full control. Still, I don't want to handle cookies by hand. So I provide a wrapper for node-fetch.
Having the cookiesupport in node, just allow you to write scrits that login, do stuff and logout. How cool is that. That is usefull for testing or accessing a website.
Having that, I will make sure that is can work well together with fetchival.
Demo
const tnfetch = ; // tnfetch is a function to that return a new fetch with its own cookie storeconst fetch = ; ; // a modified verison of fetchival, that will allow you to set fetch from the options// not just on the global and it is no longer build for browser, only for node-fetchconst fetchival = tnfetchfetchival; const amazon = ;// for the rest just see the documentation of fetchival, it is very clean