Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for 504 (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

        /** Don't store the server's response in any cache. */
        fun noStore() = commonNoStore()
    
        /**
         * Only accept the response if it is in the cache. If the response isn't cached, a `504
         * Unsatisfiable Request` response will be returned.
         */
        fun onlyIfCached() = commonOnlyIfCached()
    
        /** Don't accept a transformed response. */
        fun noTransform() = commonNoTransform()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  2. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

      }
    
      private fun getCacheOnlyResponse(request: Request): Response? {
        if (client.cache != null) {
          try {
            // Use the cache without hitting the network first
            // 504 code indicates that the Cache is stale
            val onlyIfCached =
              CacheControl.Builder()
                .onlyIfCached()
                .build()
    
            var cacheUrl = request.url
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Cache.kt

     *         .onlyIfCached()
     *         .build())
     *     .url("http://publicobject.com/helloworld.txt")
     *     .build();
     * Response forceCacheResponse = client.newCall(request).execute();
     * if (forceCacheResponse.code() != 504) {
     *   // The resource was cached! Show it.
     * } else {
     *   // The resource was not cached.
     * }
     * ```
     *
     * This technique works even better in situations where a stale response is better than no response.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  4. docs/recipes.md

    
    ### Canceling a Call ([.kt][CancelCallKotlin], [.java][CancelCallJava])
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
Back to top