- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 542 for require (0.27 sec)
-
okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt
* supported, but SHA-256 is preferred. */ @JvmStatic fun pin(certificate: Certificate): String { require(certificate is X509Certificate) { "Certificate pinning requires X509 certificates" } return "sha256/${certificate.sha256Hash().base64()}" } }
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/test/java/okhttp3/HttpUrlTest.kt
assertThat(parse("http://[0:0:0:0:0:0:0:0]/").host).isEqualTo("::") assertThat(parse("http://[::ffff:c0a8:1fe]/").host).isEqualTo("192.168.1.254") } /** * The builder permits square braces but does not require them. */ @Test fun hostIpv6Builder() { val base = parse("http://example.com/") assertThat(base.newBuilder().host("[::1]").build().toString()) .isEqualTo("http://[::1]/")
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/main/kotlin/okhttp3/MultipartReader.kt
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt
override fun isCanceled() = canceled override fun plan(): FakePlan { // Return deferred plans preferentially. These don't require addPlan(). if (deferredPlans.isNotEmpty()) return deferredPlans.removeFirst() as FakePlan if (nextPlanIndex >= plans.size && autoGeneratePlans) addPlan() require(nextPlanIndex < plans.size) { "not enough plans! call addPlan() or set autoGeneratePlans=true in the test to set this up" }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 24 04:40:49 GMT 2024 - 6.2K bytes - Viewed (0) -
docs/contribute/concurrency.md
This is necessary for bookkeeping when creating new streams. Correct framing requires that stream IDs are sequential on the socket, so we need to bundle assigning the ID with sending the `SYN_STREAM` frame. ## Connection Pool
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 16:35:36 GMT 2022 - 7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt
* 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? { require(readByte() == '\"'.code.toByte()) val result = Buffer() while (true) { val i = indexOfElement(QUOTED_STRING_DELIMITERS) if (i == -1L) return null // Unterminated quoted string.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
} private fun checkSupportResponse( name: String, response: Response?, ) { response?.apply { require(networkResponse == null) { "$name.networkResponse != null" } require(cacheResponse == null) { "$name.cacheResponse != null" } require(priorResponse == null) { "$name.priorResponse != null" } } } fun Response.Builder.commonPriorResponse(priorResponse: Response?) = apply {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 13:24:48 GMT 2024 - 5.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/MultipartBody.kt
@JvmStatic fun create( headers: Headers?, body: RequestBody, ): Part { require(headers?.get("Content-Type") == null) { "Unexpected header: Content-Type" } require(headers?.get("Content-Length") == null) { "Unexpected header: Content-Length" } return Part(headers, body) } @JvmStatic fun createFormData(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt
private val inflaterSource = InflaterSource(deflatedBytes, inflater) /** Inflates [buffer] in place as described in RFC 7692 section 7.2.2. */ @Throws(IOException::class) fun inflate(buffer: Buffer) { require(deflatedBytes.size == 0L) if (noContextTakeover) { inflater.reset() } deflatedBytes.writeAll(buffer) deflatedBytes.writeInt(OCTETS_TO_ADD_BEFORE_INFLATION)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.8K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt
writeShort(0) // additional val nameBuf = Buffer() val labels = host.split('.').dropLastWhile { it.isEmpty() } for (label in labels) { val utf8ByteCount = label.utf8Size() require(utf8ByteCount == label.length.toLong()) { "non-ascii hostname: $host" } nameBuf.writeByte(utf8ByteCount.toInt()) nameBuf.writeUtf8(label) } nameBuf.writeByte(0) // end
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.8K bytes - Viewed (0)