Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for unknown (0.21 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

          val responseBody = response.body!!
          val contentLength = responseBody.contentLength()
          val bodySize = if (contentLength != -1L) "$contentLength-byte" else "unknown-length"
          logger.log(
            buildString {
              append("<-- ${response.code}")
              if (response.message.isNotEmpty()) append(" ${response.message}")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  2. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

        assertThat(closed.get()).isTrue()
      }
    
      @Test
      fun unicodeTextWithUnsupportedEncoding() {
        val text = "eile oli oliiviõli"
        val body = text.toResponseBody("text/plain; charset=unknown".toMediaType())
        assertThat(body.string()).isEqualTo(text)
      }
    
      companion object {
        @JvmOverloads
        fun body(
          hex: String,
          charset: String? = null,
        ): ResponseBody {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

        assertThat(httpUrl.toString())
          .isEqualTo("http://username:password@host/path?query#fragment")
      }
    
      @Test
      fun fromJavaNetUrlUnsupportedScheme() {
        // java.net.MalformedURLException: unknown protocol: mailto
        platform.assumeNotAndroid()
    
        // Accessing an URL protocol that was not enabled. The URL protocol mailto is not tested and
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/ws/WebSocketExtensionsTest.kt

      fun unknownParameters() {
        assertThat(parse("permessage-deflate; unknown"))
          .isEqualTo(WebSocketExtensions(perMessageDeflate = true, unknownValues = true))
        assertThat(parse("permessage-deflate; unknown_parameter=15"))
          .isEqualTo(WebSocketExtensions(perMessageDeflate = true, unknownValues = true))
        assertThat(parse("permessage-deflate; unknown_parameter=15; unknown_parameter=15"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  5. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        assertThat(CertificateAdapters.extension.toDer(extension))
          .isEqualTo(bytes)
        assertThat(CertificateAdapters.extension.fromDer(bytes))
          .isEqualTo(extension)
      }
    
      @Test fun `extension with unknown type hint`() {
        val extension =
          Extension(
            // common name is not an extension.
            COMMON_NAME,
            false,
            "3006800109810109".decodeHex(),
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformVersion.kt

        when (val jvmSpecVersion = getJvmSpecVersion()) {
          "1.8" -> 8
          else -> jvmSpecVersion.toInt()
        }
      }
    
      fun getJvmSpecVersion(): String {
        return System.getProperty("java.specification.version", "unknown")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 917 bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

          )
          request.isChunked -> newChunkedSink() // Stream a request body of unknown length.
          contentLength != -1L -> newKnownLengthSink() // Stream a request body of a known length.
          else -> // Stream a request body of a known length.
            throw IllegalStateException(
              "Cannot stream a request body without chunked encoding or a known content length!",
            )
        }
      }
    
      override fun cancel() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        applicationLogs
          .assertLogEqual("--> GET $url")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms, unknown-length body\)"""))
          .assertNoMoreLogs()
        networkLogs
          .assertLogEqual("--> GET $url http/1.1")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms, unknown-length body\)"""))
          .assertNoMoreLogs()
      }
    
      @Test
      fun headersGet() {
        setLevel(Level.HEADERS)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  9. mockwebserver/src/main/kotlin/mockwebserver3/MockResponseBody.kt

     * called by readers.
     */
    @ExperimentalOkHttpApi
    interface MockResponseBody {
      /** The length of this response in bytes, or -1 if unknown. */
      val contentLength: Long
    
      @Throws(IOException::class)
      fun writeTo(sink: BufferedSink)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

            return method.invoke(this, *callArgs)
          }
        }
      }
    
      companion object {
        fun buildIfSupported(): Platform? {
          val jvmVersion = System.getProperty("java.specification.version", "unknown")
          try {
            // 1.8, 9, 10, 11, 12 etc
            val version = jvmVersion.toInt()
            if (version >= 9) return null
          } catch (_: NumberFormatException) {
            // expected on >= JDK 9
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
Back to top