- Sort Score
- Result 10 results
- Languages All
Results 1461 - 1470 of 1,950 for func (0.03 sec)
-
okhttp/src/test/java/okhttp3/internal/http/StatusLineTest.kt
class StatusLineTest { @Test fun parse() { val message = "Temporary Redirect" val version = 1 val code = 200 val statusLine = parse("HTTP/1.$version $code $message") assertThat(statusLine.message).isEqualTo(message) assertThat(statusLine.protocol).isEqualTo(Protocol.HTTP_1_1) assertThat(statusLine.code).isEqualTo(code) } @Test fun emptyMessage() { val version = 1
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.kt
*/ object DohProviders { private fun buildGoogle(bootstrapClient: OkHttpClient): DnsOverHttps { return DnsOverHttps.Builder() .client(bootstrapClient) .url("https://dns.google/dns-query".toHttpUrl()) .bootstrapDnsHosts(getByIp("8.8.4.4"), getByIp("8.8.8.8")) .build() } private fun buildGooglePost(bootstrapClient: OkHttpClient): DnsOverHttps {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Dec 23 10:26:25 UTC 2023 - 3.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt
} return commaFound } private fun Buffer.startsWith(prefix: Byte): Boolean = !exhausted() && this[0] == prefix /** * Reads a double-quoted string, unescaping quoted pairs like `\"` to the 2nd character in each * sequence. Returns the unescaped string, or null if the buffer isn't prefixed with a * double-quoted string. */ @Throws(EOFException::class) private fun Buffer.readQuotedString(): String? {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt
override fun contentType(): MediaType? = null override fun writeTo(sink: BufferedSink) { requestBodySinks.add(sink) } override fun isDuplex(): Boolean = true @Throws(InterruptedException::class) fun takeSink(): BufferedSink { return requestBodySinks.poll(5, SECONDS) ?: throw AssertionError("no sink to take") } fun assertNoMoreSinks() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.5K bytes - Viewed (0) -
okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt
@Test @Ignore("java.net.UnknownHostException: No results for localhost, in CI.") fun testRequest() { serverRule.server.enqueue(MockResponse()) val call = client.newCall(Request(serverRule.server.url("/"))) call.execute().use { response -> assertThat(response.code).isEqualTo(200) } } @Test fun testRequestExternal() { assumeNetwork()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RecordingExecutor.kt
} override fun shutdown() { shutdown = true } override fun shutdownNow(): List<Runnable> { throw UnsupportedOperationException() } override fun isShutdown(): Boolean { return shutdown } override fun isTerminated(): Boolean { throw UnsupportedOperationException() } override fun awaitTermination( timeout: Long, unit: TimeUnit,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseJvmTest.kt
* most [BufferedSource] instances, but not of [Buffer]. */ private fun responseBody(content: String): ResponseBody { val data = Buffer().writeUtf8(content) val source: Source = object : Source { var closed = false override fun close() { closed = true } override fun read( sink: Buffer, byteCount: Long, ): Long {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/io/FaultyFileSystem.kt
} override fun appendingSink( file: Path, mustExist: Boolean, ): Sink = FaultySink(super.appendingSink(file, mustExist), file) override fun sink( file: Path, mustCreate: Boolean, ): Sink = FaultySink(super.sink(file, mustCreate), file) inner class FaultySink(sink: Sink, private val file: Path) : ForwardingSink(sink) { override fun write( source: Buffer,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt
package okhttp3.internal import okhttp3.MediaType internal fun MediaType.commonParameter(name: String): String? { for (i in parameterNamesAndValues.indices step 2) { if (parameterNamesAndValues[i].equals(name, ignoreCase = true)) { return parameterNamesAndValues[i + 1] } } return null } internal fun MediaType.commonEquals(other: Any?): Boolean = other is MediaType && other.mediaType == mediaType
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/AsyncDns.kt
* May be an empty list indicating that the host is unreachable. */ fun onResponse( hostname: String, addresses: List<InetAddress>, ) /** * Returns an error for the DNS query. */ fun onFailure( hostname: String, e: IOException, ) } /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 3.5K bytes - Viewed (0)