xhr-stream

Wrap an XHR in a stream

Usage no npm install needed!

<script type="module">
  import xhrStream from 'https://cdn.skypack.dev/xhr-stream';
</script>

README

xhr-stream

A node stream that wraps xhr GET requests as a stream.

usage

var XhrStream = require('xhr-stream')

var xhr = new XMLHttpRequest()
xhr.open('GET', '/some-large-docs.json', true)
var stream = new XhrStream( xhr )

stream.pipe(somewhereAwesome)

options

url

You can specify a url and an XHR will be created for you.

var stream = new XhrStream( url )

about

forked from node-buffered-xhr-stream