To use undertow as a proxy server, which tracks all traffic (required for debugging purposes), I'm currently using a snippet like this:
Undertow.builder()
.addHttpListener(8080, null)
.setHandler(
Handlers.requestDump(
Handlers.proxyHandler(new SimpleProxyClientProvider(targeUri))
)
)
.build().start();
This already dumps all request and response headers. What I am searching for is a way to dump the request and response bodies, too. Any ideas of how to achieve that in combination with the ProxyHandler?