- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 340 for if (0.12 sec)
-
okhttp/src/main/kotlin/okhttp3/Interceptor.kt
* * A good way to signal a failure is with a synthetic HTTP response: * * ```kotlin * @Throws(IOException::class) * override fun intercept(chain: Interceptor.Chain): Response { * if (myConfig.isInvalid()) { * return Response.Builder() * .request(chain.request()) * .protocol(Protocol.HTTP_1_1) * .code(400) * .message("client config invalid")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt
/** * How many concurrent calls should be possible to make at any time. * The pool will routinely try to pre-emptively open connections to satisfy this minimum. * Connections will still be closed if they idle beyond the keep-alive but will be replaced. */ @JvmField val minimumConcurrentCalls: Int = 0, /** How long to wait to retry pre-emptive connection attempts that fail. */
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 03 20:39:41 GMT 2024 - 5.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HttpUrlTest.kt
@Suppress("HttpUrlsUsage") // Don't warn if we should be using https://. open class HttpUrlTest { protected open fun parse(url: String): HttpUrl { return url.toHttpUrl() } protected open fun assertInvalid( string: String, exceptionMessage: String?, ) { try { val result = string.toHttpUrl() if (exceptionMessage != null) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 67.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/idn/PunycodeTest.kt
testDecodeOnly( unicode = "ليهمابتكلموشعربي؟", punycode = "Xn--EgBpDaJ6Bu4bXfGeHfVwXn", ) } /** * It's invalid to have a label longer than 63 characters. If that's requested, the encoder may * overflow and return null. */ @Test fun overflowEncodingOversizedLabel() { val a1000 = "a".repeat(1000) val a1000MaxCodePoint = a1000 + "\udbff\udfff"
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt
* exceptions thrown from the test do not cause this check to fail. */ @RegisterExtension val noDataLeftBehind = AfterEachCallback { context: ExtensionContext -> if (context.executionException.isPresent) return@AfterEachCallback assertThat(data.readByteString().hex(), "Data not empty") .isEqualTo("") }
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) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
assertThat(body.string()).isEqualTo(text) } companion object { @JvmOverloads fun body( hex: String, charset: String? = null, ): ResponseBody { val mediaType = if (charset == null) null else "any/thing; charset=$charset".toMediaType() return hex.decodeHex().toResponseBody(mediaType) } fun exhaust(reader: Reader): String { val builder = StringBuilder()
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
import java.net.URL import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.testing.PlatformRule import org.junit.jupiter.api.Test @Suppress("HttpUrlsUsage") // Don't warn if we should be using https://. open class HttpUrlJvmTest { val platform = PlatformRule() /** This one's ugly: the HttpUrl's host is non-empty, but the URI's host is null. */ @Test
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/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
val listener = (call as? RealCall)?.eventListener ?: EventListener.NONE if (cacheCandidate != null && cacheResponse == null) { // The cache candidate wasn't applicable. Close it. cacheCandidate.body.closeQuietly() } // If we're forbidden from using the network and the cache is insufficient, fail. if (networkRequest == null && cacheResponse == null) { return Response.Builder()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Mar 22 07:09:21 GMT 2024 - 10.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt
if (HttpMethod.permitsRequestBody(request.method) && requestBody != null) { // If there's a "Expect: 100-continue" header on the request, wait for a "HTTP/1.1 100 // Continue" response before transmitting the request body. If we don't get that, return // what we did get (such as a 4xx response) without ever transmitting the request body.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 6.3K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt
val hpackWriter: Hpack.Writer = Hpack.Writer(out = hpackBuffer) @Throws(IOException::class) fun connectionPreface() { this.withLock { if (closed) throw IOException("closed") if (!client) return // Nothing to write; servers don't send connection headers! if (logger.isLoggable(FINE)) { logger.fine(format(">> CONNECTION ${CONNECTION_PREFACE.hex()}")) } sink.write(CONNECTION_PREFACE)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 11.3K bytes - Viewed (0)