Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for Hafner (0.15 sec)

  1. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientTest.kt

    import org.apache.hc.core5.http.HttpVersion
    import org.junit.After
    import org.junit.Assert.assertEquals
    import org.junit.Test
    import org.junit.runner.RunWith
    
    /**
     * Apache HttpClient 5.x.
     *
     * https://hc.apache.org/httpcomponents-client-5.0.x/index.html
     */
    @RunWith(AndroidJUnit4::class)
    class ApacheHttpClientTest {
      private var httpClient = HttpClients.createDefault()
    
      @After fun tearDown() {
        httpClient.close()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  2. mockwebserver-junit5/README.md

    ```
    testRuntimeOnly("com.squareup.okhttp3:mockwebserver3-junit5:4.12.0")
    ```
    
    Then in tests annotated `@org.junit.jupiter.api.Test`, you may add a [MockWebServer] as a test
    method parameter. It will be shut down automatically after the test runs.
    
    ```
    class MyTest {
      @Test
      void test(MockWebServer server) {
        ...
      }
    }
    ```
    
    Alternately you may add the [MockWebServer] as a constructor parameter:
    
    ```
    class MyTest {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingServerSocketFactory.kt

    package okhttp3
    
    import java.io.IOException
    import java.net.InetAddress
    import java.net.ServerSocket
    import javax.net.ServerSocketFactory
    
    /**
     * A [ServerSocketFactory] that delegates calls. Sockets can be configured after creation by
     * overriding [.configureServerSocket].
     */
    open class DelegatingServerSocketFactory(private val delegate: ServerSocketFactory) : ServerSocketFactory() {
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (2)
  4. mockwebserver/src/main/kotlin/mockwebserver3/Dispatcher.kt

        return MockResponse(socketPolicy = KeepOpen)
      }
    
      /**
       * Release any resources held by this dispatcher. Any requests that are currently being dispatched
       * should return immediately. Responses returned after shutdown will not be transmitted: their
       * socket connections have already been closed.
       */
      open fun shutdown() {}
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RetryTlsHandshake.kt

    import javax.net.ssl.SSLException
    import javax.net.ssl.SSLHandshakeException
    import javax.net.ssl.SSLPeerUnverifiedException
    import okio.IOException
    
    /** Returns true if a TLS connection should be retried after [e]. */
    fun retryTlsHandshake(e: IOException): Boolean {
      return when {
        // If there was a protocol problem, don't recover.
        e is ProtocolException -> false
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/JsseDebugLogging.kt

            when {
              message == "adding as trusted certificates" -> Type.Setup
              message == "Raw read" || message == "Raw write" -> Type.Encrypted
              message == "Plaintext before ENCRYPTION" || message == "Plaintext after DECRYPTION" -> Type.Plaintext
              message.startsWith("System property ") -> Type.Setup
              message.startsWith("Reload ") -> Type.Setup
              message == "No session to resume." -> Type.Handshake
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

      var client = clientTestRule.newClient()
    
      private lateinit var server: MockWebServer
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
    
        // Default after JDK 14, but we are avoiding tests that assume special setup.
        // System.setProperty("jdk.tls.client.enableSessionTicketExtension", "true")
        // System.setProperty("jdk.tls.server.enableSessionTicketExtension", "true")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (0)
  8. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

          .eventListenerFactory(clientTestRule.wrap(eventListener))
          .build()
    
      @BeforeEach
      fun before(server: MockWebServer) {
        this.server = server
      }
    
      @AfterEach
      fun after() {
        listener.assertExhausted()
      }
    
      @Test
      fun event() {
        server.enqueue(
          MockResponse.Builder()
            .body(
              """
              |data: hey
              |
              |
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt

     * application. The tuning parameters in this pool are subject to change in future OkHttp releases.
     * Currently this pool holds up to 5 idle connections which will be evicted after 5 minutes of
     * inactivity.
     */
    class ConnectionPool internal constructor(
      internal val delegate: RealConnectionPool,
    ) {
      internal constructor(
        maxIdleConnections: Int = 5,
        keepAliveDuration: Long = 5,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 20:39:41 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  10. okhttp-sse/src/test/java/okhttp3/sse/internal/ServerSentEventIteratorTest.kt

    class ServerSentEventIteratorTest {
      /** Either [Event] or [Long] items for events and retry changes, respectively.  */
      private val callbacks: Deque<Any> = ArrayDeque()
    
      @AfterEach
      fun after() {
        assertThat(callbacks).isEmpty()
      }
    
      @Test
      fun multiline() {
        consumeEvents(
          """
          |data: YHOO
          |data: +2
          |data: 10
          |
          |
          """.trimMargin(),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
Back to top