类 OkHttpClientUtil
java.lang.Object
dev.tinyflow.core.util.OkHttpClientUtil
Utility class for creating and configuring OkHttpClient instances.
By default, it uses secure TLS settings. Insecure HTTPS (trust-all) can be enabled
via system property tinyflow.okhttp.insecure=true, but it is strongly
discouraged in production environments.
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static okhttp3.OkHttpClientReturns a shared default OkHttpClient instance with reasonable timeouts and optional proxy.private static voidconfigureProxy(okhttp3.OkHttpClient.Builder builder) private static voidenableInsecureSsl(okhttp3.OkHttpClient.Builder builder) private static Stringprivate static Stringprivate static booleanstatic voidsetCustomBuilder(okhttp3.OkHttpClient.Builder builder) Sets a custom OkHttpClient.Builder to be used bybuildDefaultClient().
-
字段详细资料
-
LOGGER
-
customBuilder
-
LOCK
-
-
构造器详细资料
-
OkHttpClientUtil
private OkHttpClientUtil()
-
-
方法详细资料
-
setCustomBuilder
Sets a custom OkHttpClient.Builder to be used bybuildDefaultClient(). This should be called during application initialization. -
buildDefaultClient
Returns a shared default OkHttpClient instance with reasonable timeouts and optional proxy. If a custom builder was set viasetCustomBuilder(okhttp3.OkHttpClient.Builder), it will be used.SSL is secure by default. Insecure mode (trust-all) can be enabled via system property:
-Dtinyflow.okhttp.insecure=true -
isInsecureModeEnabled
-
enableInsecureSsl
-
configureProxy
-
getProxyHost
-
getProxyPort
-