Consider adding a means of transforming the outbound request (and possibly the incoming response) in the new "forward" functionality. Maybe something like:
server.expectations(expect -> {
expect.GET("/something", req -> {
req.forward(forwardEndpoint, tx -> {
tx.request(r -> {
// allow changing any part of the request before its sent to forward
});
tx.response(r -> {
// allow changing any part of response after it comes in from forward
});
});
});
});
This would increase the flexibility of the forwarding so that if you needed to make some alteration to the forwarded request or response, you don't have to modify your actual code, just some test config.
Consider adding a means of transforming the outbound request (and possibly the incoming response) in the new "forward" functionality. Maybe something like:
This would increase the flexibility of the forwarding so that if you needed to make some alteration to the forwarded request or response, you don't have to modify your actual code, just some test config.