- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for proxySelector (0.17 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Address.kt
@JvmName("-deprecated_proxySelector") @Deprecated( message = "moved to val", replaceWith = ReplaceWith(expression = "proxySelector"), level = DeprecationLevel.ERROR, ) fun proxySelector(): ProxySelector = proxySelector @JvmName("-deprecated_proxy") @Deprecated( message = "moved to val", replaceWith = ReplaceWith(expression = "proxy"),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 7.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt
@Test fun connectExceptionsAreReturnedAsSuppressed() { val proxySelector = RecordingProxySelector() proxySelector.proxies.add(Proxy(Proxy.Type.HTTP, TestUtil.UNREACHABLE_ADDRESS_IPV4)) proxySelector.proxies.add(Proxy.NO_PROXY) server.close() client = client .newBuilder() .proxySelector(proxySelector) .readTimeout(Duration.ofMillis(100))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 8.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/SocksProxyTest.kt
// The HTTP calls should share a single connection. assertThat(socksProxy.connectionCount()).isEqualTo(1) } @Test fun proxySelector() { server.enqueue(MockResponse.Builder().body("abc").build()) val proxySelector: ProxySelector = object : ProxySelector() { override fun select(uri: URI) = listOf(socksProxy.proxy()) override fun connectFailed( uri: URI,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 3.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt
proxy = proxy, protocols = protocols, connectionSpecs = connectionSpecs, proxySelector = proxySelector, ) fun newHttpsAddress( uriHost: String = this.uriHost, uriPort: Int = this.uriPort, proxy: Proxy? = null, proxySelector: ProxySelector = this.proxySelector, sslSocketFactory: SSLSocketFactory? = this.sslSocketFactory,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 7.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RouteSelector.kt
// If the URI lacks a host (as in "http://</"), don't call the ProxySelector. val uri = url.toUri() if (uri.host == null) return immutableListOf(Proxy.NO_PROXY) // Try each of the ProxySelector choices until one connection succeeds. val proxiesOrNull = address.proxySelector.select(uri) if (proxiesOrNull.isNullOrEmpty()) return immutableListOf(Proxy.NO_PROXY)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 7.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/http/RecordingProxySelector.kt
import assertk.assertions.containsExactly import java.io.IOException import java.net.InetSocketAddress import java.net.Proxy import java.net.ProxySelector import java.net.SocketAddress import java.net.URI import okhttp3.internal.format class RecordingProxySelector : ProxySelector() { @JvmField val proxies = mutableListOf<Proxy>() val requestedUris = mutableListOf<URI>() val failures = mutableListOf<String>()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 1.6K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/proxy/NullProxySelector.kt
*/ package okhttp3.internal.proxy import java.io.IOException import java.net.Proxy import java.net.ProxySelector import java.net.SocketAddress import java.net.URI /** * A proxy selector that always returns the [Proxy.NO_PROXY]. */ object NullProxySelector : ProxySelector() { override fun select(uri: URI?): List<Proxy> { requireNotNull(uri) { "uri must not be null" }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/AddressTest.kt
val a = factory.newAddress(proxySelector = RecordingProxySelector()) val b = factory.newAddress(proxySelector = RecordingProxySelector()) assertThat(b).isNotEqualTo(a) } @Test fun addressToString() { val address = factory.newAddress() assertThat(address.toString()) .isEqualTo("Address{example.com:80, proxySelector=RecordingProxySelector}") }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/FakeProxySelector.kt
* limitations under the License. */ package okhttp3 import java.io.IOException import java.net.Proxy import java.net.ProxySelector import java.net.SocketAddress import java.net.URI class FakeProxySelector : ProxySelector() { val proxies: MutableList<Proxy> = mutableListOf() fun addProxy(proxy: Proxy): FakeProxySelector { proxies.add(proxy) return this }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Route.kt
* connection the client has many options: * * * **HTTP proxy:** a proxy server may be explicitly configured for the client. Otherwise, the * [proxy selector][java.net.ProxySelector] is used. It may return multiple proxies to attempt. * * **IP address:** whether connecting directly to an origin server or a proxy, opening a socket
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.2K bytes - Viewed (0)