Adding a retry all requests of WebClient
we have a server to retrieve a OAUTH token, and the oauth token is added to each request via WebClient.filter method e.g webClient .mutate() .filter((request, next) -> tokenProvider.getBearerToken() .map(token -> ClientRequest.from(request) .headers(httpHeaders -> httpHeaders.set("Bearer", token)) .build()).flatMap(next::exchange)) .build(); TokenProvider.getBearerToken returns Mono<String> since it is a webclient request (this is cached) I want to have a retry functionality that on 401 error, will invalidate the token and try the request again I have this working like so webClient.post() .uri