()
| 187 | } |
| 188 | |
| 189 | private static OkHttpClient.Builder getBuilder() { |
| 190 | OkHttpClient.Builder builder = new OkHttpClient.Builder().addInterceptor(requestInterceptor()).addInterceptor(authInterceptor()).addNetworkInterceptor(responseInterceptor()).connectTimeout(TIMEOUT, TimeUnit.MILLISECONDS).readTimeout(TIMEOUT, TimeUnit.MILLISECONDS).writeTimeout(TIMEOUT, TimeUnit.MILLISECONDS).dns(dns()).hostnameVerifier((hostname, session) -> true).sslSocketFactory(getSSLContext().getSocketFactory(), trustAllCertificates()); |
| 191 | HttpLoggingInterceptor logging = new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY); |
| 192 | builder.proxyAuthenticator(authenticator()); |
| 193 | //builder.addNetworkInterceptor(logging); |
| 194 | builder.proxySelector(selector()); |
| 195 | return builder; |
| 196 | } |
| 197 | |
| 198 | private static SSLContext getSSLContext() { |
| 199 | try { |
no test coverage detected