Package com.algolia.internal
Class HttpRequester.Builder
java.lang.Object
com.algolia.internal.HttpRequester.Builder
- Enclosing class:
- HttpRequester
The Builder class for HttpRequester. It provides a mechanism for constructing an instance of
HttpRequester with customized configurations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddInterceptor
(okhttp3.Interceptor interceptor) Adds an interceptor to the OkHttp client.addNetworkInterceptor
(okhttp3.Interceptor interceptor) Adds a network interceptor to the OkHttp client.build
(ClientConfig config) Builds and returns a HttpRequester instance.setHttpClientConfig
(Consumer<okhttp3.OkHttpClient.Builder> config) Sets the configuration for the OkHttp client.
-
Constructor Details
-
Builder
-
-
Method Details
-
addInterceptor
Adds an interceptor to the OkHttp client.- Parameters:
interceptor
- The interceptor to be added.
-
addNetworkInterceptor
Adds a network interceptor to the OkHttp client.- Parameters:
interceptor
- The network interceptor to be added.
-
setHttpClientConfig
Sets the configuration for the OkHttp client. -
build
Builds and returns a HttpRequester instance.- Parameters:
config
- The client configuration for the HttpRequester.
-