Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
- .tlsVersions(TlsVersion.TLS_1_2)
- .cipherSuites(
- CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
- CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
- CipherSuite.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256)
- .build();
- OkHttpClient client = new OkHttpClient.Builder()
- .readTimeout(7000, TimeUnit.MILLISECONDS)
- .writeTimeout(7000, TimeUnit.MILLISECONDS)
- // .connectionSpecs(Collections.singletonList(spec)) // tambahan
- .build();
Add Comment
Please, Sign In to add comment