- Sort Score
- Result 10 results
- Languages All
Results 1461 - 1470 of 1,950 for func (0.02 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-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/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt
private val redQueue = taskRunner.newQueue() private val blueQueue = taskRunner.newQueue() private val greenQueue = taskRunner.newQueue() @AfterEach internal fun tearDown() { taskFaker.close() } @Test fun executeDelayed() { redQueue.execute("task", 100.µs) { log += "run@${taskFaker.nanoTime}" } taskFaker.advanceUntil(0.µs) assertThat(log).containsExactly()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 23K 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.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt
} override fun connectionReleased( call: Call, connection: Connection, ) { logWithTime("connectionReleased") } override fun requestHeadersStart(call: Call) { logWithTime("requestHeadersStart") } override fun requestHeadersEnd( call: Call, request: Request, ) { logWithTime("requestHeadersEnd") } override fun requestBodyStart(call: Call) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 11:07:32 UTC 2024 - 5.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CertificateChainCleanerTest.kt
.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 fun normalizeSingleSelfSignedCertificate() { val root = HeldCertificate.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.3K bytes - Viewed (0)