Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 6 of 6 for priorResponse (0.06 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

            }
    
            val requestBody = userResponse.request.body
            if (requestBody != null && requestBody.isOneShot()) {
              return null
            }
            val priorResponse = userResponse.priorResponse
            if (priorResponse != null && priorResponse.code == HTTP_CLIENT_TIMEOUT) {
              // We attempted to retry and got another timeout. Give up.
              return null
            }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 12.5K bytes
    - Click Count (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

          ),
        )
        server.enqueue(MockResponse(body = "C"))
        executeSynchronously("/a")
          .assertCode(200)
          .assertBody("C")
          .priorResponse()
          .assertCode(302)
          .assertHeader("Test", "Redirect from /b to /c")
          .priorResponse()
          .assertCode(301)
          .assertHeader("Test", "Redirect from /a to /b")
    
        // New connection.
    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)
  3. okhttp/api/android/okhttp.api

    	public final fun newBuilder ()Lokhttp3/Response$Builder;
    	public final fun peekBody (J)Lokhttp3/ResponseBody;
    	public final fun peekTrailers ()Lokhttp3/Headers;
    	public final fun priorResponse ()Lokhttp3/Response;
    	public final fun protocol ()Lokhttp3/Protocol;
    	public final fun receivedResponseAtMillis ()J
    	public final fun request ()Lokhttp3/Request;
    	public final fun sentRequestAtMillis ()J
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 72.3K bytes
    - Click Count (0)
  4. docs/recipes.md

        }
        ```
    
        This above code relies on this `responseCount` extension val:
    
        ```kotlin
        val Response.responseCount: Int
          get() = generateSequence(this) { it.priorResponse }.count()
        ```
    === ":material-language-java: Java"
        ```java
          private final OkHttpClient client;
    
          public Authenticate() {
            client = new OkHttpClient.Builder()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:01:42 GMT 2026
    - 47.8K bytes
    - Click Count (0)
  5. CHANGELOG.md

        type declaration was nullable to support rare cases like the body on `Response.cacheResponse`,
        `Response.networkResponse`, and `Response.priorResponse`. In such cases the body is now
        non-null, but attempts to read its content will fail.
     *  New: Kotlin-specific APIs for request tags. Kotlin language users can lookup tags with a type
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Feb 15 11:57:47 GMT 2026
    - 36.2K bytes
    - Click Count (2)
  6. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

        val challengeResponse = authenticator.responses[0]
        assertThat(
          challengeResponse.request.url
            .toUrl()
            .path,
        ).isEqualTo("/b")
        val redirectedBy = challengeResponse.priorResponse
        assertThat(
          redirectedBy!!
            .request.url
            .toUrl()
            .path,
        ).isEqualTo("/a")
      }
    
      @Test
      fun attemptAuthorization20Times() {
    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)
Back to Top