Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for immutable (0.18 sec)

  1. okhttp/src/test/java/okhttp3/CacheControlTest.kt

            .maxStale(2.seconds)
            .minFresh(3.seconds)
            .onlyIfCached()
            .noTransform()
            .immutable()
            .build()
        assertThat(cacheControl.toString()).isEqualTo(
          "no-cache, no-store, max-age=1, max-stale=2, min-fresh=3, only-if-cached, no-transform, immutable",
        )
        assertThat(cacheControl.noCache).isTrue()
        assertThat(cacheControl.noStore).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-CacheControlCommon.kt

            if (minFreshSeconds != -1) append("min-fresh=").append(minFreshSeconds).append(", ")
            if (onlyIfCached) append("only-if-cached, ")
            if (noTransform) append("no-transform, ")
            if (immutable) append("immutable, ")
            if (isEmpty()) return ""
            deleteRange(length - 2, length)
          }
        headerValue = result
      }
      return result
    }
    
    internal fun Long.commonClampToInt(): Int {
      return when {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CacheControlJvmTest.kt

            .minFresh(3, TimeUnit.SECONDS)
            .onlyIfCached()
            .noTransform()
            .immutable()
            .build()
        assertThat(cacheControl.toString()).isEqualTo(
          "no-cache, no-store, max-age=1, max-stale=2, min-fresh=3, only-if-cached, " +
            "no-transform, immutable",
        )
        assertThat(cacheControl.noCache).isTrue()
        assertThat(cacheControl.noStore).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

        level = DeprecationLevel.ERROR,
      )
      fun noTransform(): Boolean = noTransform
    
      @JvmName("-deprecated_immutable")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "immutable"),
        level = DeprecationLevel.ERROR,
      )
      fun immutable(): Boolean = immutable
    
      override fun toString(): String = commonToString()
    
      /** Builds a `Cache-Control` request header. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Headers.kt

      fun value(index: Int): String = commonValue(index)
    
      /** Returns an immutable case-insensitive set of header names. */
      fun names(): Set<String> {
        val result = TreeSet(String.CASE_INSENSITIVE_ORDER)
        for (i in 0 until size) {
          result.add(name(i))
        }
        return Collections.unmodifiableSet(result)
      }
    
      /** Returns an immutable list of the header values for `name`. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Request.kt

    import okhttp3.internal.commonRemoveHeader
    import okhttp3.internal.commonTag
    import okhttp3.internal.commonToString
    
    /**
     * An HTTP request. Instances of this class are immutable if their [body] is null or itself
     * immutable.
     */
    class Request internal constructor(builder: Builder) {
      @get:JvmName("url")
      val url: HttpUrl = checkNotNull(builder.url) { "url == null" }
    
      @get:JvmName("method")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. docs/changelogs/upgrading_to_okhttp_4.md

     * **Address**: certificatePinner, connectionSpecs, dns, hostnameVerifier, protocols, proxy,
       proxyAuthenticator, proxySelector, socketFactory, sslSocketFactory, url
     * **Cache**: directory
     * **CacheControl**: immutable, maxAgeSeconds, maxStaleSeconds, minFreshSeconds, mustRevalidate,
       noCache, noStore, noTransform, onlyIfCached, sMaxAgeSeconds
     * **Challenge**: authParams, charset, realm, scheme
     * **CipherSuite**: javaName
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/Response.kt

    import okhttp3.internal.connection.Exchange
    import okhttp3.internal.http.parseChallenges
    import okio.Buffer
    
    /**
     * An HTTP response. Instances of this class are not immutable: the response body is a one-shot
     * value that may be consumed only once and then closed. All other properties are immutable.
     *
     * This class implements [Closeable]. Closing it simply closes its response body. See
     * [ResponseBody] for an explanation and examples.
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    internal fun Response.headersContentLength(): Long {
      return headers["Content-Length"]?.toLongOrDefault(-1L) ?: -1L
    }
    
    /** Returns an immutable copy of this. */
    internal fun <T> List<T>.toImmutableList(): List<T> {
      return Collections.unmodifiableList(toMutableList())
    }
    
    /** Returns an immutable list containing [elements]. */
    @SafeVarargs
    internal fun <T> immutableListOf(vararg elements: T): List<T> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val minFreshSeconds: Int = cacheControl.minFreshSeconds()
        val onlyIfCached: Boolean = cacheControl.onlyIfCached()
        val noTransform: Boolean = cacheControl.noTransform()
        val immutable: Boolean = cacheControl.immutable()
        val parse: CacheControl = CacheControl.parse(Headers.of())
      }
    
      @Test @Disabled
      fun challenge() {
        val challenge = Challenge("", mapOf("" to ""))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
Back to top