Describe the bug
When RestCient is initialized by a RestTemplate using RestClient.builder(restTemplate) the interceptors are executed 2 times.
To Reproduce
Create a RestTemplate with an interceptor (loggingInterceptor to make it simple).
Initialize a RestClient and then perform a call restClient.get().uri(uri).retrieve().body(YourObject.class)
LoggingInterceptor will be executed 2 times because 2 ClientHttpRequestInterceptor object are created. (Please find attached)
Expected behavior
The interceptor must be executed once
Hi, @rawadolb. RestClient is from Spring Framework and not from Spring Security, you will find better support by opening an issue in their issue tracker.
Describe the bug When RestCient is initialized by a RestTemplate using RestClient.builder(restTemplate) the interceptors are executed 2 times.
To Reproduce Create a RestTemplate with an interceptor (loggingInterceptor to make it simple). Initialize a RestClient and then perform a call restClient.get().uri(uri).retrieve().body(YourObject.class) LoggingInterceptor will be executed 2 times because 2 ClientHttpRequestInterceptor object are created. (Please find attached)
Expected behavior The interceptor must be executed once