These are chat archives for spring-cloud/spring-cloud

30th
Mar 2019
Raúl Tovar
@raultov
Mar 30 18:22
Hi guys, I'm implementing a GatewayFilter to read a specific field of the response and then store it with Redis.
The thing is that I don't Manage to extract any body from ServerHttpResponse
    @Override
    public GatewayFilter apply(Config config) {
        return (exchange, chain) -> {
            return chain.filter(exchange).then(Mono.fromRunnable(() -> {
                ServerHttpResponse response = exchange.getResponse();

                // response.getBody();
            }));
        };
    }
Does anyone how to extract the body from the response?