snekfetch
Version:
Just do http requests without all that weird nastiness from other libs
40 lines (27 loc) • 1.58 kB
Markdown
[](https://www.npmjs.com/package/snekfetch)
[](https://www.npmjs.com/package/snekfetch)
[](https://david-dm.org/guscaplan/snekfetch)
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdevsnek%2Fsnekfetch?ref=badge_shield)
[](https://nodei.co/npm/snekfetch/)
# snekfetch
Snekfetch is a fast, efficient, and user-friendly library for making
HTTP requests.
The API was inspired by superagent, and any methods that snekfetch has should
be dropin with superagent.
Documentation is available as JSDOC in `src/index.js`
## Some examples
```js
const snekfetch = require('snekfetch');
snekfetch.get('https://s.gus.host/o-SNAKES-80.jpg')
.then(r => fs.writeFile('download.jpg', r.body);
snekfetch.get('https://s.gus.host/o-SNAKES-80.jpg')
.pipe(fs.createWriteStream('download.jpg'));
```
```js
const snekfetch = require('snekfetch');
snekfetch.post('https://httpbin.org/post')
.send({ meme: 'dream' })
.then(r => console.log(r.body));
```
## License
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdevsnek%2Fsnekfetch?ref=badge_large)