curveball / core

The Curveball framework is a TypeScript framework for node.js with support for modern HTTP features.
https://curveballjs.org/
MIT License
526 stars 7 forks source link

Support for a callback response body. #166

Closed evert closed 3 years ago

evert commented 3 years ago

This allows a user to set the body as such:

ctx.response.body = (writable) => {
   writable.send('hello world!');
   writable.end();
 };

This makes it easy to deal with streams.

Fixes #165

cc @imdmitrykravchenko