Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for priorResponse (0.09 sec)

  1. okhttp/src/main/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:24:48 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Response.kt

      @JvmName("-deprecated_priorResponse")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "priorResponse"),
        level = DeprecationLevel.ERROR,
      )
      fun priorResponse(): Response? = priorResponse
    
      /**
       * Returns the RFC 7235 authorization challenges appropriate for this response's code. If the
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jul 06 09:38:30 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

        require(cacheResponse == null) { "$name.cacheResponse != null" }
        require(priorResponse == null) { "$name.priorResponse != null" }
      }
    }
    
    fun Response.Builder.commonPriorResponse(priorResponse: Response?) =
      apply {
        this.priorResponse = priorResponse
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:24:48 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. 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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  8. okhttp/src/main/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  9. 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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Feb 18 08:52:22 UTC 2022
    - 40.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/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.
    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