Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for responseCount (0.08 sec)

  1. docs/recipes.md

        ```kotlin
        if (response.responseCount >= 3) {
          return null // If we've failed 3 times, give up.
        }
        ```
    
        This above code relies on this `responseCount` extension val:
    
        ```kotlin
        val Response.responseCount: Int
          get() = generateSequence(this) { it.priorResponse }.count()
        ```
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Feb 18 08:52:22 UTC 2022
    - 40.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     * to limit the retries by the class of errors and number of attempts.  To get the number of
     * 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;
     * }
     * ```
     *
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.5K bytes
    - Viewed (0)
Back to top