Skip to content

Event support

Please integrate the possibility to register a callback for an event called something like "onMessage". The callback should get the received request and the prepared response as data strings:

Mock.on( "message", ( requestString, responseString ) => { ... } )

I guess this would be really useful for using the mockup-service in unit tests.

Mock.stop() removes the event-handler, too.