Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  2. 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 =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  3. 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(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  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 =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. 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()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 56.9K bytes
    - Viewed (2)
  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")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  7. 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"),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  8. 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()
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K 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
    }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jul 22 12:28:51 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  10. mockwebserver/api/mockwebserver3.api

    	public final fun takeRequest ()Lmockwebserver3/RecordedRequest;
    	public final fun takeRequest (JLjava/util/concurrent/TimeUnit;)Lmockwebserver3/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;)V
    }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 03 21:59:45 UTC 2023
    - 12.7K bytes
    - Viewed (0)
Back to top