- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for newClient (0.07 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt
builder.protocols(listOf(Protocol.HTTP_1_0, Protocol.HTTP_1_1)) } } @Test fun certificatePinnerEquality() { val clientA = clientTestRule.newClient() val clientB = clientTestRule.newClient() assertThat(clientB.certificatePinner).isEqualTo(clientA.certificatePinner) } @Test fun nullInterceptorInList() { val builder = OkHttpClient.Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 13.4K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
import org.junit.jupiter.api.extension.ExtensionContext /** * Apply this rule to all tests. It adds additional checks for leaked resources and uncaught * exceptions. * * Use [newClient] as a factory for a OkHttpClient instances. These instances are specifically * configured for testing. */ class OkHttpClientTestRule : BeforeEachCallback, AfterEachCallback {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 10.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt
import org.junit.jupiter.api.extension.RegisterExtension @Timeout(30) @Tag("Slow") class WholeOperationTimeoutTest { @RegisterExtension val clientTestRule = OkHttpClientTestRule() private val client = clientTestRule.newClient() @StartStop private val server = MockWebServer() @Test fun defaultConfigIsNoTimeout() { val request = Request .Builder() .url(server.url("/")) .build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 10.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionReuseTest.kt
@StartStop private val server = MockWebServer() private val handshakeCertificates = platform.localhostHandshakeCertificates() private var client: OkHttpClient = clientTestRule.newClient() @Test fun connectionsAreReused() { server.enqueue(MockResponse(body = "a")) server.enqueue(MockResponse(body = "b")) val request = Request(server.url("/"))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 12.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CookiesTest.kt
@Timeout(30) class CookiesTest { @RegisterExtension val clientTestRule = OkHttpClientTestRule() @StartStop private val server = MockWebServer() private var client = clientTestRule.newClient() @Test fun testNetscapeResponse() { val cookieManager = CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER) client = client .newBuilder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 13K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
@Tag("Slow") class InterceptorTest { @RegisterExtension val clientTestRule = OkHttpClientTestRule() @StartStop private val server = MockWebServer() private var client = clientTestRule.newClient() private val callback = RecordingCallback() @Test fun applicationInterceptorsCanShortCircuitResponses() { server.close() // Accept no connections. val request = Request .Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 28.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/RouteSelectorTest.kt
this.uriPort = ******@****.***t } private lateinit var call: RealCall private val routeDatabase = RouteDatabase() @BeforeEach fun setUp() { call = clientTestRule.newClient().newCall( Request .Builder() .url("https://$uriHost:$uriPort/") .build(), ) as RealCall } @AfterEach fun tearDown() { factory.close() }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 20.7K bytes - Viewed (0)