pipelining
2.2.3 • Public • Published pipelining
Xhr chunked stream client for the browser and NodeJS
HOW TO USE
front-end
const pipelining = require('pipelining');
const reader = pipelining('/test');
function read() {
reader.read().then(partial => {
if (partial.done) {
return;
}
handle(partial.data).then(read);
});
}
read();
back-end
const pipelining = require('pipelining');
function (req, res) {
res.write(pipelining.pack(1));
res.write(pipelining.pack({ tom: 'test' }));
res.end();
}
TODO:
- node.js version
- headers support
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 2.2.3
2
Version History
Package Sidebar
Install
Weekly Downloads