Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for sort (0.14 sec)

  1. samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java

          // Deserialize HTTP response to concrete type.
          ResponseBody body = response.body();
          List<Contributor> contributors = CONTRIBUTORS_JSON_ADAPTER.fromJson(body.source());
    
          // Sort list by the most contributions.
          Collections.sort(contributors, (c1, c2) -> c2.contributions - c1.contributions);
    
          // Output list of contributors.
          for (Contributor contributor : contributors) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

            inFrames.add(inFrame)
          }
        }
      }
    
      fun openSocket(): Socket = Socket("localhost", port)
    
      @Synchronized override fun close() {
        executor.shutdown()
        socket?.closeQuietly()
        serverSocket?.closeQuietly()
      }
    
      override fun toString(): String = "MockHttp2Peer[$port]"
    
      private class OutFrame(
        val sequence: Int,
        val start: Long,
        val truncated: Boolean,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        }
      }
    
      private fun supportsUrl(url: HttpUrl): Boolean {
        lock.assertHeld()
    
        val routeUrl = route.address.url
    
        if (url.port != routeUrl.port) {
          return false // Port mismatch.
        }
    
        if (url.host == routeUrl.host) {
          return true // Host match. The URL is supported.
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        )
      }
    
      companion object {
        private const val PROXY_A_PORT = 1001
        private const val PROXY_A_HOST = "proxya"
        private val proxyA =
          Proxy(
            Proxy.Type.HTTP,
            InetSocketAddress.createUnresolved(PROXY_A_HOST, PROXY_A_PORT),
          )
    
        private const val PROXY_B_PORT = 1002
        private const val PROXY_B_HOST = "proxyb"
        private val proxyB =
          Proxy(
    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)
  5. okhttp/src/test/java/okhttp3/CallTest.kt

        configureClientAndServerProxies(http2 = false)
        server.enqueue(
          MockResponse(body = "response body"),
        )
        val port = server.port
        val url =
          server.url("/").newBuilder()
            .host("::1")
            .port(port)
            .build()
        val request = Request(url)
        val response = client.newCall(request).execute()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  6. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

          serverSocket!!.accept().use { rawSocket ->
            val sslSocket =
              server.sslSocketFactory().createSocket(
                rawSocket,
                rawSocket.inetAddress.hostAddress,
                rawSocket.port,
                true,
              ) as SSLSocket
            sslSocket.use {
              sslSocket.useClientMode = false
              sslSocket.wantClientAuth = true
              sslSocket.startHandshake()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

        }
    
        // Optimization: check whether hostname is too short to match the pattern. hostName must be at
        // least as long as the pattern because asterisk must match the whole left-most label and
        // hostname starts with a non-empty label. Thus, asterisk has to match one or more characters.
        if (hostname.length < pattern.length) {
          return false // Hostname too short to match the pattern.
        }
    
        if ("*." == pattern) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            val sslSocket =
              route.address.sslSocketFactory.createSocket(
                rawSocket,
                route.address.url.host,
                route.address.url.port,
                // autoClose:
                true,
              ) as SSLSocket
    
            val tlsEquipPlan = planWithCurrentOrInitialConnectionSpec(connectionSpecs, sslSocket)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Cache.kt

     * the response, the client will issue a conditional `GET`. The server will then send either
     * the updated response if it has changed, or a short 'not modified' response if the client's copy
     * is still valid. Such responses increment both the network count and hit count.
     *
     * The best way to improve the cache hit rate is by configuring the web server to return cacheable
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  10. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
            .hostnameVerifier(hostnameVerifier)
            .build()
        host = "${server.hostName}:${server.port}"
        url = server.url("/")
      }
    
      @Test
      fun levelGetter() {
        // The default is NONE.
        assertThat(applicationInterceptor.level).isEqualTo(Level.NONE)
        for (level in Level.entries) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
Back to top