RequestListener

A listener invoked when a matched stub is about to send its response.

This is a Java-friendly alternative to the suspend-lambda MokksyServer.onResponseReady overload.

Example (Java):

mokksy.addListener((request, response) -> {
assertThat(request.getUri()).isEqualTo("/path");
});

See also

Functions

Link copied to clipboard
abstract fun onResponseReady(request: RecordedRequest, response: AbstractResponseDefinition<*>)

Called when a matched stub is about to send its response.