- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for newClientBuilder (0.11 sec)
-
okhttp/src/test/java/okhttp3/InsecureForHostTest.kt
val clientCertificates = HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .addInsecureHost(server.hostName) .build() val client = clientTestRule.newClientBuilder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager) .build() val call = client.newCall(Request(server.url("/"))) val response = call.execute()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt
server.useHttps(handshakeCertificates.sslSocketFactory()) val dns = Dns { Dns.SYSTEM.lookup(server.hostName) } val client = clientTestRule.newClientBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ) .dns(dns) .build() server.enqueue(MockResponse())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocksProxyTest.kt
} @Test fun proxy() { server.enqueue(MockResponse.Builder().body("abc").build()) server.enqueue(MockResponse.Builder().body("def").build()) val client = clientTestRule.newClientBuilder() .proxy(socksProxy.proxy()) .build() val request1 = Request.Builder().url(server.url("/")).build() val response1 = client.newCall(request1).execute()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/LoomTest.kt
private lateinit var client: OkHttpClient @BeforeEach fun setUp(server: MockWebServer) { platform.assumeLoom() this.server = server client = clientTestRule.newClientBuilder() .dispatcher(Dispatcher(newVirtualThreadPerTaskExecutor())) .build() } private fun newVirtualThreadPerTaskExecutor(): ExecutorService {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
serverSocket.setReceiveBufferSize(SOCKET_BUFFER_SIZE) return serverSocket } } client = clientTestRule.newClientBuilder() .socketFactory( object : DelegatingSocketFactory(getDefault()) { @Throws(IOException::class) override fun configureSocket(socket: Socket): Socket {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt
server.protocolNegotiationEnabled = false val loggingFileSystem = LoggingFilesystem(fileSystem) cache = buildCache("/cache/".toPath(), Int.MAX_VALUE.toLong(), loggingFileSystem) client = clientTestRule.newClientBuilder() .cache(cache) .cookieJar(JavaNetCookieJar(cookieManager)) .build() } @AfterEach fun tearDown() { ResponseCache.setDefault(null) if (this::cache.isInitialized) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K bytes - Viewed (0) -
okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt
import org.junit.jupiter.api.fail class ExecuteAsyncTest { @RegisterExtension val clientTestRule = OkHttpClientTestRule() private var client = clientTestRule.newClientBuilder().build() private lateinit var server: MockWebServer val request by lazy { Request(server.url("/")) } @BeforeEach fun setup(server: MockWebServer) { this.server = server }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:24:38 UTC 2024 - 5.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocketChannelTest.kt
) if (socketMode is TlsInstance) { assumeTrue((socketMode.provider == CONSCRYPT) == platform.isConscrypt()) } val client = clientTestRule.newClientBuilder() .dns { listOf(InetAddress.getByName("localhost")) } .callTimeout(4, SECONDS) .writeTimeout(2, SECONDS) .readTimeout(2, SECONDS) .apply {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
@RegisterExtension val clientTestRule = OkHttpClientTestRule() private val eventListener = RecordingEventListener() private val listener = EventSourceRecorder() private var client = clientTestRule.newClientBuilder() .eventListenerFactory(clientTestRule.wrap(eventListener)) .build() @BeforeEach fun before(server: MockWebServer) { this.server = server } @AfterEach fun after() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 6.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
private val listener = RecordingEventListener() private val handshakeCertificates = platform.localhostHandshakeCertificates() private var client = clientTestRule.newClientBuilder() .eventListenerFactory(clientTestRule.wrap(listener)) .build() private lateinit var server: MockWebServer @BeforeEach fun setUp(server: MockWebServer) { this.server = server
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0)