@dillonchr/fetch

1.0.1 • Public • Published

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);
});

Readme

Keywords

none

Package Sidebar

Install

npm i @dillonchr/fetch

Weekly Downloads

2

Version

1.0.1

License

GPL-2.0

Unpacked Size

2.26 kB

Total Files

3

Last publish

Collaborators

  • nightwind