Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for populate (0.29 sec)

  1. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

    import org.junit.jupiter.api.Test
    
    /**
     * Apache HttpClient 5.x.
     *
     * https://hc.apache.org/httpcomponents-client-5.0.x/index.html
     *
     * Baseline test if we ned to validate OkHttp behaviour against other popular clients.
     */
    class ApacheHttpClientTest {
      private val httpClient = HttpClients.createDefault()
    
      @AfterEach fun tearDown() {
        httpClient.close()
      }
    
      @Test fun get(server: MockWebServer) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  2. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt

    import org.junit.Assert
    import org.junit.Test
    
    /**
     * Simplified from
     * https://hc.apache.org/httpcomponents-client-5.0.x/httpclient5/examples/AsyncClientTlsAlpn.java
     *
     * Mainly intended to verify behaviour of popular clients across Android versions, similar
     * to observing Firefox or Chrome browser behaviour.
     */
    class ApacheHttpClientHttp2Test {
      @Test
      fun testHttp2() {
        val client = HttpAsyncClients.createHttp2Default()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

    import org.junit.jupiter.api.extension.RegisterExtension
    
    /**
     * Java HTTP Client.
     *
     * https://openjdk.java.net/groups/net/httpclient/intro.html
     *
     * Baseline test if we ned to validate OkHttp behaviour against other popular clients.
     */
    class JavaHttpClientTest {
      @JvmField @RegisterExtension
      val platform = PlatformRule()
    
      @Test fun get(server: MockWebServer) {
        // Not available
        platform.expectFailureOnJdkVersion(8)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt

    import java.util.concurrent.BlockingQueue
    import java.util.concurrent.LinkedBlockingQueue
    import java.util.logging.Logger
    import okhttp3.ExperimentalOkHttpApi
    
    /**
     * Default dispatcher that processes a script of responses. Populate the script by calling [enqueueResponse].
     */
    @ExperimentalOkHttpApi
    open class QueueDispatcher : Dispatcher() {
      protected val responseQueue: BlockingQueue<MockResponse> = LinkedBlockingQueue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/HttpMethod.kt

    object HttpMethod {
      @JvmStatic // Despite being 'internal', this method is called by popular 3rd party SDKs.
      fun invalidatesCache(method: String): Boolean =
        (
          method == "POST" || method == "PATCH" || method == "PUT" ||
            method == "DELETE" || method == "MOVE"
        )
    
      @JvmStatic // Despite being 'internal', this method is called by popular 3rd party SDKs.
      fun requiresRequestBody(method: String): Boolean =
        (
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/http2/Hpack.kt

          private val source: BufferedSource = source.buffer()
    
          // Visible for testing.
          @JvmField var dynamicTable = arrayOfNulls<Header>(8)
    
          // Array is populated back to front, so new entries always have lowest index.
          private var nextHeaderIndex = dynamicTable.size - 1
    
          @JvmField var headerCount = 0
    
          @JvmField var dynamicTableByteCount = 0
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (1)
  7. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

              return cacheResponse
            }
          } catch (ioe: IOException) {
            // Failures are ignored as we can fallback to the network
            // and hopefully repopulate the cache.
          }
        }
    
        return null
      }
    
      @Throws(Exception::class)
      private fun readResponse(
        hostname: String,
        response: Response,
      ): List<InetAddress> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Settings.kt

        val bit = 1 shl MAX_HEADER_LIST_SIZE
        return if (bit and set != 0) values[MAX_HEADER_LIST_SIZE] else defaultValue
      }
    
      /**
       * Writes `other` into this. If any setting is populated by this and `other`, the
       * value and flags from `other` will be kept.
       */
      fun merge(other: Settings) {
        for (i in 0 until COUNT) {
          if (!other.isSet(i)) continue
          set(i, other[i])
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

     *
     * ### Username and Password
     *
     * Username and password are either present, or the empty string `""` if absent. This class offers
     * no mechanism to differentiate empty from absent. Neither of these components are popular in
     * practice. Typically HTTP applications use other mechanisms for user identification and
     * authentication.
     *
     * ### Host
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  10. samples/compare/src/test/kotlin/okhttp3/compare/JettyHttpClientTest.kt

    import org.junit.jupiter.api.Test
    
    /**
     * Jetty HTTP client.
     *
     * https://www.eclipse.org/jetty/documentation/current/http-client.html
     *
     * Baseline test if we ned to validate OkHttp behaviour against other popular clients.
     */
    class JettyHttpClientTest {
      private val client = HttpClient()
    
      @BeforeEach fun setUp() {
        client.start()
      }
    
      @AfterEach fun tearDown() {
        client.stop()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
Back to top