node-fetch - is built into nodejs

 

Instead of importing node-fetch, spending hours trying to make it work with typescript, all you need to do is 

/// nf.js

fetch('https://www.google.com')
    .then((response) => response.text())
    .then((body) => {
        console.log(body);
    });

Then execute it using command "node --experimental-fetch nf.js






Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm