Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for enforce (0.18 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

    import okhttp3.internal.connection.RealConnection
    import okio.IOException
    import org.junit.jupiter.api.Assertions
    
    open class RecordingConnectionListener(
      /**
       * An override to ignore the normal order that is enforced.
       * EventListeners added by Interceptors will not see all events.
       */
      private val enforceOrder: Boolean = true,
    ) : ConnectionListener() {
      val eventSequence: Deque<ConnectionEvent> = ConcurrentLinkedDeque()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Dns.kt

     * [system DNS service][SYSTEM], which is the default. Some applications may provide their own
     * implementation to use a different DNS server, to prefer IPv6 addresses, to prefer IPv4 addresses,
     * or to force a specific known IP address.
     *
     * Implementations of this interface must be safe for concurrent use.
     */
    fun interface Dns {
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        // Write metadata to the end of the file.
        writeMetadata(upstreamSize)
        file!!.channel.force(false)
    
        // Once everything else is in place we can swap the dirty header for a clean one.
        writeHeader(PREFIX_CLEAN, upstreamSize, metadata.size.toLong())
        file!!.channel.force(false)
    
        // This file is complete.
        synchronized(this@Relay) {
          complete = true
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

            val headers = request.headers
    
            if (requestBody != null) {
              // Request body headers are only present when installed as a network interceptor. When not
              // already present, force them to be included (if available) so their values are known.
              requestBody.contentType()?.let {
                if (headers["Content-Type"] == null) {
                  logger.log("Content-Type: $it")
                }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/Protocol.kt

       *
       * HTTP/2 requires deployments of HTTP/2 that use TLS 1.2 support
       * [CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256], present in Java 8+ and Android 5+.
       * Servers that enforce this may send an exception message including the string
       * `INADEQUATE_SECURITY`.
       */
      HTTP_2("h2"),
    
      /**
       * Cleartext HTTP/2 with no "upgrade" round trip. This option requires the client to have prior
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:17:33 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  6. docs/changelogs/upgrading_to_okhttp_4.md

     * **Binary compatibility** is the ability to compile a program against OkHttp 3.x, and then to run
       it against OkHttp 4.x. We’re using the excellent [japicmp][japicmp] library via its
       [Gradle plugin][japicmp_gradle] to enforce binary compatibility.
    
     * **Java source compatibility** is the ability to upgrade Java uses of OkHttp 3.x to 4.x without
       changing `.java` files.
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

       * We get plan3 as a retry of plan0, which was canceled when it lost the race.
       *
       * This test confirms that we prefer to do the TLS follow-up (plan2) before the TCP retry (plan3).
       * It also confirms we enforce the 250 ms delay in each race.
       */
      @Test
      fun tcpConnectionsRaceAfterTlsFails() {
        val plan0 = routePlanner.addPlan()
        plan0.tcpConnectDelayNanos = 280.ms
    
        val plan1 = routePlanner.addPlan()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

        this.withLock {
          if (this.errorCode == null) {
            this.errorCode = errorCode
            condition.signalAll()
          }
        }
      }
    
      /**
       * Returns true if read timeouts should be enforced while reading response headers or body bytes.
       * We always do timeouts in the HTTP server role. For clients, we only do timeouts after the
       * request is transmitted. This is only interesting for duplex calls where the request and
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  9. samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java

          if (i == 2) {
            // Force this request's response to be written to the cache. This way, subsequent responses
            // can be read from the cache.
            System.out.println("Force cache: true");
            clientForCall = client.newBuilder()
                .addNetworkInterceptor(REWRITE_CACHE_CONTROL_INTERCEPTOR)
                .build();
          } else {
            System.out.println("Force cache: false");
            clientForCall = client;
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 2.6K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

          }
        assertThat(requestsMade.size).isEqualTo(0)
        mockWebServer.dispatcher = dispatcher
        val url = mockWebServer.url("/").toUrl()
        val conn = url.openConnection() as HttpURLConnection
        conn.responseCode // Force the connection to hit the "server".
        // Make sure our dispatcher got the request.
        assertThat(requestsMade.size).isEqualTo(1)
      }
    
      @Test
      fun outOfOrderResponses() {
        val firstResponseCode = AtomicInteger()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
Back to top