1.0.2 • Published 9 years ago

json-stream-response v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

SYNOPSIS

Stream a JSON response from an http server. Useful for when restify doesn't send a content-type by default when you send a JSON stream through it... this does.

USAGE

var jsr = require('json-stream-response');

function requestHandler(req, res, next) {
  // ...
  var ws = jsr(res);
  ws.write(bigJSONThing);
  ws.write(bigJSON2);
  ws.end();
  res.on('finish', next);
}
1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago