Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for toProxyAddress (0.2 sec)

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

        client =
          OkHttpClient.Builder()
            .connectionPool(client.connectionPool)
            .proxy(server.toProxyAddress())
            .build()
        executeSynchronously("/a").assertBody("abc")
        client =
          OkHttpClient.Builder()
            .connectionPool(client.connectionPool)
            .proxy(server.toProxyAddress())
            .build()
        executeSynchronously("/b").assertBody("def")
        client =
    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. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockWebServer.kt

        message = "moved to val",
        replaceWith = ReplaceWith(expression = "port"),
        level = DeprecationLevel.ERROR,
      )
      fun getPort(): Int = port
    
      fun toProxyAddress(): Proxy {
        before() // This implicitly starts the delegate.
        return delegate.toProxyAddress()
      }
    
      @JvmName("-deprecated_serverSocketFactory")
      @Deprecated(
        message = "moved to var",
        replaceWith =
          ReplaceWith(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  3. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        val mockWebServer: MockWebServer = MockWebServer()
        var port: Int = mockWebServer.port
        var hostName: String = mockWebServer.hostName
        hostName = mockWebServer.hostName
        val toProxyAddress: Proxy = mockWebServer.toProxyAddress()
        mockWebServer.serverSocketFactory = ServerSocketFactory.getDefault()
        val url: HttpUrl = mockWebServer.url("")
        mockWebServer.bodyLimit = 0L
    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 (1)
  4. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

          clientTestRule.newClientBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
            .proxy(server.toProxyAddress())
            .build()
    
        server.enqueue(MockResponse(inTunnel = true))
        server.enqueue(MockResponse())
    
        val call =
          client.newCall(
            Request(
              url =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        // Use a misconfigured proxy to guarantee that the request is retried.
        client =
          client.newBuilder()
            .proxySelector(
              FakeProxySelector()
                .addProxy(server2.toProxyAddress())
                .addProxy(Proxy.NO_PROXY),
            )
            .build()
        server2.shutdown()
        val request =
          Request(
            url = server.url("/def"),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

          "ConnectionReleased",
        )
      }
    
      @Test
      @Throws(IOException::class)
      fun successfulHttpProxyConnect() {
        server!!.enqueue(MockResponse())
        val proxy = server!!.toProxyAddress()
        client =
          client.newBuilder()
            .proxy(proxy)
            .build()
        val call =
          client.newCall(
            Request.Builder()
              .url("http://www.fakeurl")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

      }
    
      @Test
      fun hostnameImplicitlyStarts() {
        assertThat(server.hostName).isNotNull()
      }
    
      @Test
      fun toProxyAddressImplicitlyStarts() {
        assertThat(server.toProxyAddress()).isNotNull()
      }
    
      @Test
      fun differentInstancesGetDifferentPorts() {
        val other = MockWebServer()
        assertThat(other.port).isNotEqualTo(server.port)
        other.shutdown()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/EventListenerTest.kt

        listener.removeUpToEvent<CallEvent.ConnectEnd>()
      }
    
      @Test
      fun successfulHttpProxyConnect() {
        server.enqueue(MockResponse())
        client =
          client.newBuilder()
            .proxy(server.toProxyAddress())
            .build()
        val call =
          client.newCall(
            Request.Builder()
              .url("http://www.fakeurl")
              .build(),
          )
        val response = call.execute()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  9. mockwebserver-deprecated/api/mockwebserver.api

    	public final fun takeRequest ()Lokhttp3/mockwebserver/RecordedRequest;
    	public final fun takeRequest (JLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/RecordedRequest;
    	public final fun toProxyAddress ()Ljava/net/Proxy;
    	public fun toString ()Ljava/lang/String;
    	public final fun url (Ljava/lang/String;)Lokhttp3/HttpUrl;
    	public final fun useHttps (Ljavax/net/ssl/SSLSocketFactory;Z)V
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jul 22 12:28:51 GMT 2023
    - 10.2K bytes
    - Viewed (0)
  10. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      }
    
      @Test
      fun hostnameImplicitlyStarts() {
        assertThat(server.hostName).isNotNull()
      }
    
      @Test
      fun toProxyAddressImplicitlyStarts() {
        assertThat(server.toProxyAddress()).isNotNull()
      }
    
      @Test
      fun differentInstancesGetDifferentPorts() {
        val other = MockWebServer()
        assertThat(other.port).isNotEqualTo(server.port)
        other.shutdown()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
Back to top