- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for unknown (0.19 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt
/** * Constrains which certificates are trusted. Pinning certificates defends against attacks on * certificate authorities. It also prevents connections through man-in-the-middle certificate * authorities either known or unknown to the application's user. * This class currently pins a certificate's Subject Public Key Info as described on * [Adam Langley's Weblog][langley]. Pins are either base64 SHA-256 hashes as in
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 14.2K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt
TYPE_GOAWAY -> readGoAway(handler, length, flags, streamId) TYPE_WINDOW_UPDATE -> readWindowUpdate(handler, length, flags, streamId) else -> source.skip(length.toLong()) // Implementations MUST discard frames of unknown types. } return true } @Throws(IOException::class) private fun readHeaders( handler: Handler, length: Int, flags: Int, streamId: Int, ) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 19.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt
closed = true } else -> { throw ProtocolException("Unknown control opcode: " + opcode.toHexString()) } } } @Throws(IOException::class) private fun readMessageFrame() { val opcode = this.opcode if (opcode != OPCODE_TEXT && opcode != OPCODE_BINARY) { throw ProtocolException("Unknown opcode: ${opcode.toHexString()}") } readMessage()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/ResponseBody.kt
private var reader: Reader? = null abstract fun contentType(): MediaType? /** * Returns the number of bytes in that will returned by [bytes], or [byteStream], or -1 if * unknown. */ abstract fun contentLength(): Long fun byteStream(): InputStream = source().inputStream() abstract fun source(): BufferedSource /** * Returns the response as a byte array.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.7K bytes - Viewed (0)