Output
Every Marble.js listener factory allows you to intercept outgoing messages via dedicated output$ handler.
Building your own output effect
Using HttpOutputEffect
you can grab an outgoing HTTP response and map it into different response, modifying outgoing data on demand.
HttpOutputEffect
allows you to grab the outgoing response together with corresponding initial request. Lets build a simple response compression middleware.
To connect the output effect, all you need to do is to attach it to output$
property in httpListener
config object.
Last updated