Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 17 of 17 for newClient (0.03 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt

      @JvmField @RegisterExtension
      val clientTestRule =
        OkHttpClientTestRule().apply {
          recordFrames = true
          recordSslDebug = true
        }
    
      private var client = clientTestRule.newClient()
      private val handshakeCertificates = platform.localhostHandshakeCertificates()
    
      @StartStop
      private val server = MockWebServer()
    
      @Test
      fun legalToExecuteTwiceCloning() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

      @StartStop
      val server = MockWebServer()
    
      @StartStop
      val server2 = MockWebServer()
    
      private val handshakeCertificates = platform.localhostHandshakeCertificates()
      private var client = clientTestRule.newClient()
      private var cache: Cache? = null
    
      @BeforeEach
      fun setUp() {
        server.protocolNegotiationEnabled = false
      }
    
      @AfterEach
      fun tearDown() {
        java.net.Authenticator.setDefault(null)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
Back to top