npm.io
1.0.1 • Published 7 years ago

@dillonchr/fetch

Licence
GPL-2.0
Version
1.0.1
Deps
0
Size
2 kB
Vulns
0
Weekly
0

Fetch

I'm on a mission to minimize my dependencies so I decided to build something very small and simple that can replicate the experience I'm used to in browsers with fetch. Maybe not the promised-based bit but still, something from the core of node so that it doesn't have to extend my network of trusted modules.

Usage

const fetch = require('@dillonchr/fetch');

fetch({
    url: 'https://bot.whatismyipaddress.com'
}, (err, body) => {
    if (err) {
        return console.log('Module must be broken, heh.');
    }
    console.log('Looking into the mirror, I can tell we're at', body);
});