Package Exports
- nodeify-fetch
- nodeify-fetch/browser.js
- nodeify-fetch/index.js
- nodeify-fetch/test/support/browser
- nodeify-fetch/test/support/server
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 (nodeify-fetch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
nodeify-fetch
The nodeify-fetch
packages provides a node stream interface for fetch.
It's based on isomorphic-fetch
for node and browser support.
Usage
The only difference to the fetch standard is the .body
property.
nodeify-fetch
patches the .body
to a readable stream:
const fetch = require('nodeify-fetch')
fetch('url').then(res) => {
res.body.on('data', (chunk) => {
...
})
res.body.on('end', () => {
...
})
})