Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 56 for add (0.13 sec)

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

        val headers =
          Headers.Builder()
            .add("WWW-Authenticate: Basic realm=\"protected area\"")
            .build()
        assertThat(headers.parseChallenges("WWW-Authenticate"))
          .isEqualTo(listOf(Challenge("Basic", mapOf("realm" to "protected area"))))
      }
    
      @Test fun basicChallengeWithCharset() {
        val headers =
          Headers.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        return result
      }
    
      fun acquireConnectionNoEvents(connection: RealConnection) {
        connection.lock.assertHeld()
    
        check(this.connection == null)
        this.connection = connection
        connection.calls.add(CallReference(this, callStackTrace))
      }
    
      /**
       * Releases resources held with the request or response of [exchange]. This should be called when
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  3. docs/changelogs/changelog_4x.md

            .build()
    
        val client = OkHttpClient.Builder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
            .build()
        ```
    
     *  New: Add `cacheHit`, `cacheMiss`, and `cacheConditionalHit()` events to `EventListener`. Use
        these in logs, metrics, and even test cases to confirm your cache headers are configured as
        expected.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Headers.kt

              }
            }
          }
    
        /** Add an header line containing a field name, a literal colon, and a value. */
        fun add(line: String) =
          apply {
            val index = line.indexOf(':')
            require(index != -1) { "Unexpected header: $line" }
            add(line.substring(0, index).trim(), line.substring(index + 1))
          }
    
        /**
    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)
  5. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        assertThat(routeSelector.hasNext()).isFalse()
      }
    
      @Test fun proxyDnsFailureContinuesToNextProxy() {
        val address = factory.newAddress()
        proxySelector.proxies.add(proxyA)
        proxySelector.proxies.add(proxyB)
        proxySelector.proxies.add(proxyA)
        val routeSelector = newRouteSelector(address)
        proxySelector.assertRequests(address.url.toUri())
        assertThat(routeSelector.hasNext()).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

     *
     * ```java
     * CertificatePinner certificatePinner = new CertificatePinner.Builder()
     *     .add("publicobject.com", "sha256/afwiKY3RxoMmLkuRW1l7QsPZTJPwDS2pdDROQjXw8ig=")
     *     .add("publicobject.com", "sha256/klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=")
     *     .add("publicobject.com", "sha256/grX4Ta9HpZx6tSHkmCrvpApTQGo67CYDnvprLg5yRME=")
     *     .add("publicobject.com", "sha256/lCppFqbkrlJ3EcVFAkeip0+44VaoJUymbnOaEUk7tEU=")
     *     .build();
     * ```
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

         */
        fun addHeader(header: String) =
          apply {
            headers.add(header)
          }
    
        /**
         * Adds a new header with the name and value. This may be used to add multiple headers with the
         * same name.
         */
        fun addHeader(
          name: String,
          value: Any,
        ) = apply {
          headers.add(name, value.toString())
        }
    
        /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  8. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

      }
    
      private fun secondRequestWithoutHuffman() {
        bytesIn.writeByte(0x82) // == Indexed - Add ==
        // idx = 2 -> :method: GET
        bytesIn.writeByte(0x86) // == Indexed - Add ==
        // idx = 7 -> :scheme: http
        bytesIn.writeByte(0x84) // == Indexed - Add ==
        // idx = 6 -> :path: /
        bytesIn.writeByte(0xbe) // == Indexed - Add ==
        // Indexed name (idx = 62) -> :authority: www.example.com
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/ConnectionSpecTest.kt

            .build()
        val set: MutableSet<Any> = CopyOnWriteArraySet()
        assertThat(set.add(ConnectionSpec.MODERN_TLS)).isTrue()
        assertThat(set.add(ConnectionSpec.COMPATIBLE_TLS)).isTrue()
        assertThat(set.add(ConnectionSpec.CLEARTEXT)).isTrue()
        assertThat(set.add(allTlsVersions)).isTrue()
        assertThat(set.add(allCipherSuites)).isTrue()
        allCipherSuites.hashCode()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CookiesTest.kt

        val cookieA = HttpCookie("a", "android")
        cookieA.domain = serverUrl.host
        cookieA.path = "/"
        cookieManager.cookieStore.add(serverUrl.toUri(), cookieA)
        val cookieB = HttpCookie("b", "banana")
        cookieB.domain = serverUrl.host
        cookieB.path = "/"
        cookieManager.cookieStore.add(serverUrl.toUri(), cookieB)
        client =
          client.newBuilder()
            .cookieJar(JavaNetCookieJar(cookieManager))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
Back to top