Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for challenge (0.07 sec)

  1. okhttp/src/test/java/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,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/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 -> {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/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()
            }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top