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
Describe the bug
Hi guys, @OlgaMaciaszek,
at the docs about Retrofit with WebClient you can find information about how to configure a WebClient.Builder to be used under the hood for the Retrofit clients as shown by the following configuration:
@Configuration
@EnableRetrofitClients
class OkHttpClientConfig {
@Bean
@LoadBalanced
public WebClient.Builder okHttpClientBuilder() {
return WebClient.builder();
}
}
As you can notice, this configuration shows us how to use a shared WebClient.Builder to be used for all the @RetrofitClient instances.
I have the following question: how Can I configure a different WebClient.Builder for each @RetrofitClient instance?
Imagine I have two client instances:
How can I configure 2 different WebClient Builders, one for Api1Client and other for Api2Client?
Is there a way to specify a different WebClient.Builder to be used in the @RetrofitClient?
Please, could you help me with these questions?
Thanks and Regards.
Sample
If possible, please provide a test case or sample application that reproduces
the problem. This makes it much easier for us to diagnose the problem and to verify that
we have fixed it.
The text was updated successfully, but these errors were encountered:
dante-ricalde
changed the title
how to configure a different WebClient.Builder bean (not shared) for each @RetrofitClient instance?
how to configure different WebClient.Builder beans (not shared) for each @RetrofitClient instance?
Aug 9, 2021
OlgaMaciaszek
changed the title
how to configure different WebClient.Builder beans (not shared) for each @RetrofitClient instance?
Allow configuring different WebClient.Builder beans (not shared) for each @RetrofitClient instance?
Sep 14, 2021
Describe the bug
Hi guys, @OlgaMaciaszek,
at the docs about Retrofit with WebClient you can find information about how to configure a
WebClient.Builder
to be used under the hood for the Retrofit clients as shown by the following configuration:As you can notice, this configuration shows us how to use a shared
WebClient.Builder
to be used for all the@RetrofitClient
instances.I have the following question:
how Can I configure a different
WebClient.Builder
for each@RetrofitClient
instance?Imagine I have two client instances:
and
and I want to configure different timeouts and other properties for each client:
for example for Api1Client I want to configure:
and for client Api2Client I want to configure:
How can I configure 2 different WebClient Builders, one for Api1Client and other for Api2Client?
Is there a way to specify a different
WebClient.Builder
to be used in the@RetrofitClient
?Please, could you help me with these questions?
Thanks and Regards.
Sample
If possible, please provide a test case or sample application that reproduces
the problem. This makes it much easier for us to diagnose the problem and to verify that
we have fixed it.
The text was updated successfully, but these errors were encountered: