Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

nodeify-fetch

2.0.0 • Public • Published

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', () => {
    ...
  })
})

install

npm i nodeify-fetch

Downloadsweekly downloads

562

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar