Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for cacheUrlOverride (0.09 sec)

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

         *
         * Note that POST requests will not be sent to the server if this URL is set
         * and matches a cached response.
         */
        fun cacheUrlOverride(cacheUrlOverride: HttpUrl?) =
          apply {
            this.cacheUrlOverride = cacheUrlOverride
          }
    
        open fun build(): Request = Request(this)
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:17:44 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

        }
      }
    }
    
    private fun Request.requestForCache(): Request {
      val cacheUrlOverride = cacheUrlOverride
    
      return if (cacheUrlOverride != null && (method == "GET" || method == "POST")) {
        newBuilder()
          .get()
          .url(cacheUrlOverride)
          .cacheUrlOverride(null)
          .build()
      } else {
        this
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Mar 22 07:09:21 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  3. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

                .onlyIfCached()
                .build()
    
            var cacheUrl = request.url
    
            val cacheRequest =
              request.newBuilder()
                .cacheControl(onlyIfCached)
                .cacheUrlOverride(cacheUrl)
                .build()
    
            val cacheResponse = client.newCall(cacheRequest).execute()
    
            if (cacheResponse.code != HttpURLConnection.HTTP_GATEWAY_TIMEOUT) {
              return cacheResponse
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Oct 31 09:27:31 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CacheTest.kt

      @Test
      fun postWithOverrideResponse() {
        val url = server.url("/abc?token=123")
        val cacheUrlOverride = url.newBuilder().removeAllQueryParameters("token").build()
    
        val request =
          Request.Builder()
            .url(url)
            .method("POST", "XYZ".toRequestBody())
            .cacheUrlOverride(cacheUrlOverride)
            .build()
    
        val response = testBasicCachingRules(request)
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  5. CHANGELOG.md

        of OkHttp 5.
    
     *  Breaking: Reorder the parameters in the Cache constructor that was introduced in 5.0.0-alpha.3.
    
     *  New: `Request.Builder.cacheUrlOverride()` customizes the cache key used for a request. This can
        be used to make canonical URLs for the cache that omit insignificant query parameters or other
        irrelevant data.
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 18 01:31:39 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  6. okhttp/api/okhttp.api

    	public final fun body ()Lokhttp3/RequestBody;
    	public final fun cacheControl ()Lokhttp3/CacheControl;
    	public final fun cacheUrlOverride ()Lokhttp3/HttpUrl;
    	public final fun header (Ljava/lang/String;)Ljava/lang/String;
    	public final fun headers ()Lokhttp3/Headers;
    	public final fun headers (Ljava/lang/String;)Ljava/util/List;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 70.2K bytes
    - Viewed (0)
Back to top