Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 60 for clients (0.15 sec)

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

        client =
          OkHttpClient.Builder()
            .proxy(server.toProxyAddress())
            .build()
        server.enqueue(MockResponse(body = "abc"))
        server.enqueue(MockResponse(body = "def"))
        server.enqueue(MockResponse(body = "ghi"))
        client = client.newBuilder().build()
        executeSynchronously("/a").assertBody("abc")
        client = client.newBuilder().build()
    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)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        )
      }
    
      fun newRoutePlanner(
        client: OkHttpClient,
        address: Address = newAddress(),
      ): RealRoutePlanner {
        val call = RealCall(client, Request(address.url), forWebSocket = false)
        val chain = newChain(call)
        return RealRoutePlanner(
          taskRunner = client.taskRunner,
          connectionPool = client.connectionPool.delegate,
          readTimeoutMillis = client.readTimeoutMillis,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  3. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

      val mockServer: MockServerContainer =
        MockServerContainer(MOCKSERVER_IMAGE)
          .withNetworkAliases("mockserver")
    
      @Test
      fun testOkHttpDirect() {
        testRequest {
          val client = OkHttpClient()
    
          val response =
            client.newCall(
              Request((mockServer.endpoint + "/person?name=peter").toHttpUrl()),
            ).execute()
    
          assertThat(response.body.string()).contains("Peter the person")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        }
      }
    
      @Test
      fun none() {
        server.enqueue(MockResponse())
        client.newCall(request().build()).execute()
        applicationLogs.assertNoMoreLogs()
        networkLogs.assertNoMoreLogs()
      }
    
      @Test
      fun basicGet() {
        setLevel(Level.BASIC)
        server.enqueue(MockResponse())
        client.newCall(request().build()).execute()
        applicationLogs
          .assertLogEqual("--> GET $url")
    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)
  5. okhttp-android/src/test/kotlin/okhttp3/android/RobolectricOkHttpClientTest.kt

    @RunWith(RobolectricTestRunner::class)
    @Config(
      sdk = [30],
    )
    class RobolectricOkHttpClientTest {
      private lateinit var context: Context
      private lateinit var client: OkHttpClient
    
      @Before
      fun setUp() {
        context = ApplicationProvider.getApplicationContext<Application>()
        client =
          OkHttpClient.Builder()
            .cache(Cache(FakeFileSystem(), "/cache".toPath(), 10_000_000))
            .build()
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  6. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

            .build()
        val client =
          HandshakeCertificates.Builder()
            .addTrustedCertificate(serverRoot.certificate)
            .heldCertificate(clientCertificate, clientIntermediate.certificate)
            .build()
        val serverAddress = startTlsServer()
        val serverHandshakeFuture = doServerHandshake(server)
        val clientHandshakeFuture = doClientHandshake(client, serverAddress)
    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/Cache.kt

     *    cache.
     *
     * Sometimes a request will result in a conditional cache hit. If the cache contains a stale copy of
     * 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.
     *
    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)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

        while (true) {
          val source = this.source!!
          val sink = this.sink!!
          val tunnelCodec =
            Http1ExchangeCodec(
              // No client for CONNECT tunnels:
              client = null,
              carrier = this,
              source = source,
              sink = sink,
            )
          source.timeout().timeout(readTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
    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-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

      private fun buildLocalhost(
        bootstrapClient: OkHttpClient,
        includeIPv6: Boolean,
        post: Boolean = false,
      ): DnsOverHttps {
        val url = server.url("/lookup?ct")
        return DnsOverHttps.Builder().client(bootstrapClient)
          .includeIPv6(includeIPv6)
          .resolvePrivateAddresses(true)
          .url(url)
          .post(post)
          .build()
      }
    
      companion object {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

            .build(),
        )
        val client1 =
          client.newBuilder()
            .readTimeout(Duration.ofSeconds(2))
            .build()
        val call1 =
          client1
            .newCall(
              Request.Builder()
                .url(server.url("/"))
                .build(),
            )
        val client2 =
          client.newBuilder()
            .readTimeout(Duration.ofMillis(200))
            .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
Back to top