Package Exports
- snekfetch
- snekfetch/src/node/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (snekfetch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
snekfetch
Snekfetch is a fast, efficient, and user-friendly library for making HTTP requests.
The API was inspired by superagent, however it is much smaller and faster. In fact, in browser, it is a mere 8kb.
Documentation is available as JSDOC in src/index.js
Some examples
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'));
const snekfetch = require('snekfetch');
snekfetch.post('https://httpbin.org/post')
.send({ meme: 'dream' })
.then(r => console.log(r.body));