- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for exceptions (0.27 sec)
-
okhttp/src/test/java/okhttp3/CacheTest.kt
assertThat(response2.handshake!!.cipherSuite).isEqualTo( response1.handshake!!.cipherSuite, ) } /** * We've had bugs where caching and cross-protocol redirects yield class cast exceptions internal * to the cache because we incorrectly assumed that HttpsURLConnection was always HTTPS and * HttpURLConnection was always HTTP; in practice redirects mean that each can do either. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 108.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
assertFailsWith<UnsupportedOperationException> { client.newBuilder() .sslSocketFactory(handshakeCertificates.sslSocketFactory()) } } /** Confirm that runtime exceptions thrown inside of OkHttp propagate to the caller. */ @Test fun unexpectedExceptionSync() { client = client.newBuilder() .dns { hostname: String? -> throw RuntimeException("boom!") }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
client = client.newBuilder() .addInterceptor( Interceptor { chain: Interceptor.Chain -> chain.proceed(chain.request()) throw AssertionError() // We expect an exception. }, ) .build() val call = client.newCall(Request(server.url("/a"))) call.cancel() assertFailsWith<IOException> { call.execute() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0)