- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for challenges (0.07 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
assertThat(response.code).isEqualTo(HttpURLConnection.HTTP_PROXY_AUTH) assertThat(response.request.url.host).isEqualTo("android.com") val challenges = response.challenges() assertThat(challenges[0].scheme).isEqualTo("OkHttp-Preemptive") response.request .newBuilder() .header("Proxy-Authorization", credential) .build()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:02:18 GMT 2026 - 146.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
val response = authenticator.onlyResponse() assertThat( response.request.url .toUrl() .path, ).isEqualTo("/private") assertThat(response.challenges()).isEqualTo(listOf(Challenge("Basic", "protected area"))) } @Test fun customTokenAuthenticator() { server.enqueue( MockResponse( code = 401,
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 133.3K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
.addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) .code(responseCode) .body("ABCDE") .addHeader("WWW-Authenticate: challenge") when (responseCode) { HttpURLConnection.HTTP_PROXY_AUTH -> { builder.addHeader("Proxy-Authenticate: Basic realm=\"protected area\"") } HttpURLConnection.HTTP_UNAUTHORIZED -> {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Mar 20 09:13:37 GMT 2026 - 121K bytes - Click Count (0)