mockserver-client-node icon indicating copy to clipboard operation
mockserver-client-node copied to clipboard

Add forwardWithCallback

Open pedrorfernandes opened this issue 2 years ago • 2 comments

I've created forwardWithCallback() in the style of mockWithCallback(), tried to make as minimal change as possible, could reuse some of the code in createExpectationWithCallback but opted to keep it all separate

The only difference in contract with mockWithCallback() is the requestAndResponseHandler, which if present triggers responseCallback: true. Don't know if there are other scenarios other than replying an HttpRequest and then a HttpResponse to the websocket but I can implement them if needed

If approach is approved I can look into testing and later updating the docs for the javascript example

pedrorfernandes avatar Mar 17 '23 16:03 pedrorfernandes

missing implementation in WebSocketClient at mockServerClient.js

pedrorfernandes avatar Mar 21 '23 10:03 pedrorfernandes

@jamesdbloom is it possible to merge and release this?

pedrorfernandes avatar Nov 10 '23 15:11 pedrorfernandes