You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comparing what the ClientHttpRequestFactories does compared to the default settings already in the RestClient, they seem very similar. The only difference I can tell is the Spring Boot ClientHttpRequestFactories looks for okhttp3.OkHttpClient while the DefaultRestClientBuilder looks for java.net.http.
I'm trying to find a good way to use the defaults provided by Spring Boot while doing custom enhancements outside of the service class itself so I can just inject the specific builder to match the practices I've used with RestTemplate, however with the additional code to initialize the builder, it seems either I'm missing something or this is something that shouldn't have been there in the first place and needs to be taken out. From what I can see, the autoconfig should be able to be something like the following but I'm also thinking maybe this was intentional for reasons that's not immediately apparent:
Let me know your thoughts and if needed I can provide the approaches I had in mind and you can tell me if maybe my thought process was in the wrong place or not.
The text was updated successfully, but these errors were encountered:
Looking at
RestClientAutoConfiguration
, the following code is used to create a RestClient.Builder:Comparing what the
ClientHttpRequestFactories
does compared to the default settings already in theRestClient
, they seem very similar. The only difference I can tell is the Spring BootClientHttpRequestFactories
looks forokhttp3.OkHttpClient
while theDefaultRestClientBuilder
looks forjava.net.http
.I'm trying to find a good way to use the defaults provided by Spring Boot while doing custom enhancements outside of the service class itself so I can just inject the specific builder to match the practices I've used with
RestTemplate
, however with the additional code to initialize the builder, it seems either I'm missing something or this is something that shouldn't have been there in the first place and needs to be taken out. From what I can see, the autoconfig should be able to be something like the following but I'm also thinking maybe this was intentional for reasons that's not immediately apparent:Let me know your thoughts and if needed I can provide the approaches I had in mind and you can tell me if maybe my thought process was in the wrong place or not.
The text was updated successfully, but these errors were encountered: