Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 197 for get (0.16 sec)

  1. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        this.server = server
      }
    
      @Test
      fun testPlatform() {
        assertTrue(Platform.isAndroid)
    
        if (Build.VERSION.SDK_INT >= 29) {
          assertTrue(Platform.get() is Android10Platform)
        } else {
          assertTrue(Platform.get() is AndroidPlatform)
        }
      }
    
      @Test
      fun testRequest() {
        assumeNetwork()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  2. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

      /** Returns the HTTP response line, such as "HTTP/1.1 200 OK". */
      val status: String
    
      val code: Int
        get() {
          val statusParts = status.split(' ', limit = 3)
          require(statusParts.size >= 2) { "Unexpected status: $status" }
          return statusParts[1].toInt()
        }
    
      val message: String
        get() {
          val statusParts = status.split(' ', limit = 3)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/Headers.kt

      operator fun get(name: String): String? = commonHeadersGet(namesAndValues, name)
    
      /**
       * Returns the last value corresponding to the specified field parsed as an HTTP date, or null if
       * either the field is absent or cannot be parsed as a date.
       */
      fun getDate(name: String): Date? = get(name)?.toHttpDateOrNull()
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              Platform.get().getSelectedProtocol(sslSocket)
            } else {
              null
            }
          socket = sslSocket
          source = sslSocket.source().buffer()
          sink = sslSocket.sink().buffer()
          protocol = if (maybeProtocol != null) Protocol.get(maybeProtocol) else Protocol.HTTP_1_1
          success = true
        } finally {
          Platform.get().afterHandshake(sslSocket)
          if (!success) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Settings.kt

      /** Flag values. */
      private val values = IntArray(COUNT)
    
      /** Returns -1 if unset. */
      val headerTableSize: Int
        get() {
          val bit = 1 shl HEADER_TABLE_SIZE
          return if (bit and set != 0) values[HEADER_TABLE_SIZE] else -1
        }
    
      val initialWindowSize: Int
        get() {
          val bit = 1 shl INITIAL_WINDOW_SIZE
          return if (bit and set != 0) values[INITIAL_WINDOW_SIZE] else DEFAULT_INITIAL_WINDOW_SIZE
    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)
  6. okcurl/build.gradle.kts

      expand("projectVersion" to "${project.version}")
      filteringCharset = Charsets.UTF_8.toString()
    }
    
    kotlin {
      sourceSets {
        val main by getting {
          resources.srcDir(copyResourcesTemplates.get().outputs)
        }
      }
    }
    
    dependencies {
      api(libs.kotlin.stdlib)
      api(projects.okhttp)
      api(projects.loggingInterceptor)
      api(libs.squareup.okio)
      implementation(libs.clikt)
      api(libs.guava.jre)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.8K bytes
    - Viewed (1)
  7. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

    import okhttp3.internal.http.StatusLine
    import okio.sink
    
    internal fun Main.commonCreateRequest(): Request {
      val request = Request.Builder()
    
      val requestMethod = method ?: if (data != null) "POST" else "GET"
    
      val url = url ?: throw IOException("No url provided")
    
      request.url(url)
    
      data?.let {
        request.method(requestMethod, it.toRequestBody(mediaType()))
      }
    
      for (header in headers.orEmpty()) {
    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)
  8. mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/internal/MockWebServerExtension.kt

     */
    @ExperimentalOkHttpApi
    class MockWebServerExtension :
      BeforeEachCallback, AfterEachCallback, ParameterResolver, BeforeAllCallback, AfterAllCallback {
      private val ExtensionContext.resource: ServersForTest
        get() =
          getStore(namespace).getOrComputeIfAbsent(this.uniqueId) {
            ServersForTest()
          } as ServersForTest
    
      private class ServersForTest {
        private val servers = mutableMapOf<String, MockWebServer>()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 11 12:12:36 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/TestTls13Request.kt

        .connectionSpecs(listOf(*specs))
        .build()
    }
    
    private fun sendRequest(
      client: OkHttpClient,
      url: String,
    ) {
      System.out.printf("%-40s ", url)
      System.out.flush()
      println(Platform.get())
      val request =
        Request.Builder()
          .url(url)
          .build()
      try {
        client.newCall(request).execute().use { response ->
          val handshake = response.handshake
          println(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CertificateChainCleanerTest.kt

            .serialNumber(2L)
            .build()
        assertThat(get(rootB.certificate, rootA.certificate))
          .isEqualTo(get(rootA.certificate, rootB.certificate))
      }
    
      @Test
      fun equalsFromTrustManager() {
        val handshakeCertificates = HandshakeCertificates.Builder().build()
        val x509TrustManager = handshakeCertificates.trustManager
        assertThat(get(x509TrustManager)).isEqualTo(get(x509TrustManager))
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top