Open
Description
AFAIK, there is currently no generic / documented way to manipulate responses before they are passed on to the underlying socket (through a transform stream for example). I can think of 2 instances where this would be useful: compression and monitoring outgoing bandwidth.
The https://github.com/expressjs/compression/ module resorts to monkey patching the res
object which is prone to error, difficult to maintain and not extensible.
It would be nice if there was a documented and extensible way to manipulate responses before they are passed to the underlying socket.