RestClient : interceptors are executed 2 times #32196
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: duplicate
A duplicate of another issue
type: bug
A general bug
Uh oh!
There was an error while loading. Please reload this page.
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
The text was updated successfully, but these errors were encountered: