Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for priorResponse (0.07 sec)

  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
            }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:58:02 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt

        }
    
      /**
       * Asserts that the current response was redirected and returns the prior response.
       */
      fun priorResponse(): RecordedResponse {
        val priorResponse = response!!.priorResponse!!
        return RecordedResponse(priorResponse.request, priorResponse, null, null, null)
      }
    
      /**
       * Asserts that the current response used the network and returns the network response.
       */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt

            require(cacheResponse == null) { "$name.cacheResponse != null" }
            require(priorResponse == null) { "$name.priorResponse != null" }
          }
        }
    
        open fun priorResponse(priorResponse: Response?) =
          apply {
            this.priorResponse = priorResponse
          }
    
        open fun trailers(trailersSource: TrailersSource): Builder =
          apply {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/UnreadableResponseBody.kt

        throw IllegalStateException(
          """
          |Unreadable ResponseBody! These Response objects have bodies that are stripped:
          | * Response.cacheResponse
          | * Response.networkResponse
          | * Response.priorResponse
          | * EventSourceListener
          | * WebSocketListener
          |(It is safe to call contentType() and contentLength() on these response bodies.)
          """.trimMargin(),
        )
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 15:19:53 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

        val body: ResponseBody = response.body()
        val networkResponse: Response? = response.networkResponse()
        val cacheResponse: Response? = response.cacheResponse()
        val priorResponse: Response? = response.priorResponse()
        val cacheControl: CacheControl = response.cacheControl()
        val sentRequestAtMillis: Long = response.sentRequestAtMillis()
        val receivedResponseAtMillis: Long = response.receivedResponseAtMillis()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val redirect: Boolean = response.isRedirect
        val networkResponse: Response? = response.networkResponse
        val cacheResponse: Response? = response.cacheResponse
        val priorResponse: Response? = response.priorResponse
        val challenges: List<Challenge> = response.challenges()
        val cacheControl: CacheControl = response.cacheControl
        val sentRequestAtMillis: Long = response.sentRequestAtMillis
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Authenticator.kt

     * attempts to the current point use this function.
     *
     * ```java
     * private int responseCount(Response response) {
     *   int result = 1;
     *   while ((response = response.priorResponse()) != null) {
     *     result++;
     *   }
     *   return result;
     * }
     * ```
     *
     * [1]: https://tools.ietf.org/html/rfc2817
     */
    fun interface Authenticator {
      /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  8. docs/changelogs/upgrading_to_okhttp_4.md

     * **PushPromise**: headers, method, path, response
     * **Request**: body, cacheControl, headers, method, url
     * **Response**: body, cacheControl, cacheResponse, code, handshake, headers, message,
       networkResponse, priorResponse, protocol, receivedResponseAtMillis, request, sentRequestAtMillis
     * **Route**: address, proxy, socketAddress
     * **TlsVersion**: javaName
    
    #### Renamed Functions
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

        val sanUrl =
          url
            .newBuilder()
            .host("san.com")
            .build()
        execute(sanUrl).use { response ->
          assertThat(response.code).isEqualTo(200)
          assertThat(response.priorResponse!!.code).isEqualTo(421)
          assertThat(response.body.string()).isEqualTo("after misdirect")
        }
        val c0e0 = server.takeRequest()
        assertThat(c0e0.connectionIndex).isEqualTo(0)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jun 19 11:44:16 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  10. 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()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
Back to top