- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for regex (0.14 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt
internal fun MediaType.commonHashCode(): Int = mediaType.hashCode() private const val TOKEN = "([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)" private const val QUOTED = "\"([^\"]*)\"" private val TYPE_SUBTYPE = Regex("$TOKEN/$TOKEN") private val PARAMETER = Regex(";\\s*(?:$TOKEN=(?:$TOKEN|$QUOTED))?") /** * Returns a media type for this string. * * @throws IllegalArgumentException if this is not a well-formed media type. */
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.1K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt
assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip") assertThat(recorded.headers["Connection"]).isEqualTo("Keep-Alive") assertThat(recorded.headers["User-Agent"]!!).matches(Regex("okhttp/.*")) }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.8K bytes - Viewed (0) -
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliBombTest.kt
val uncompressed = uncompress(response) assertFailure { uncompressed.body.string() }.isInstanceOf<IOException>() .message() .isNotNull() .matches( Regex( "decompression bomb\\? outputByteCount=\\d+, inputByteCount=\\d+ exceeds max ratio of 100", ), ) } /** Returns a ByteString that expands to 10 GiB when Brotli-decompressed. */
Plain Text - Registered: Fri Mar 29 11:42:11 GMT 2024 - Last Modified: Mon Jan 29 22:50:20 GMT 2024 - 2.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/OkHttpTest.kt
*/ package okhttp3 import assertk.assertThat import assertk.assertions.matches import org.junit.jupiter.api.Test class OkHttpTest { @Test fun testVersion() { assertThat(OkHttp.VERSION).matches(Regex("[0-9]+\\.[0-9]+\\.[0-9]+(-.+)?")) }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Dec 21 01:54:49 GMT 2023 - 848 bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
import okio.Source import okio.blackholeSink import okio.buffer /** * A cache that uses a bounded amount of space on a filesystem. Each cache entry has a string key * and a fixed number of values. Each key must match the regex `[a-z0-9_-]{1,64}`. Values are byte * sequences, accessible as streams or files. Each value must be between `0` and `Int.MAX_VALUE` * bytes in length. *
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 34.7K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
.assertLogMatch(Regex("""User-Agent: okhttp/.+""")) .assertLogEqual("--> END GET") .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms\)""")) .assertLogEqual("Content-Type: text/html; charset=0") .assertLogMatch(Regex("""Content-Length: \d+""")) .assertLogMatch(Regex("")) .assertLogEqual("Body with unknown charset") .assertLogMatch(Regex("""<-- END HTTP \(\d+ms, 25-byte body\)"""))
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Apr 06 09:14:38 GMT 2024 - 37.6K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt
} assertThat(recorded.headers["HTTP2-Settings"]).isNotNull() assertThat(recorded.headers["Upgrade"]).isEqualTo("h2c") // HTTP/2 over plaintext! assertThat(recorded.headers["User-Agent"]!!).matches(Regex("Java-http-client/.*")) }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartReaderTest.kt
|--simple boundary | |abcd |--simple boundary | |efgh |--simple boundary-- """.trimMargin() .replace("\n", "\r\n") .replace(Regex("(?m)abcd\r\n"), "abcd\n") val parts = MultipartReader( boundary = "simple boundary", source = Buffer().writeUtf8(multipart), ) val part = parts.nextPart()!!
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13.8K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
.assertLogMatch(Regex("""callStart: Request\{method=POST, url=$url\}""")) .assertLogMatch(Regex("""proxySelectStart: $url""")) .assertLogMatch(Regex("""proxySelectEnd: \[DIRECT]""")) .assertLogMatch(Regex("""dnsStart: ${url.host}""")) .assertLogMatch(Regex("""dnsEnd: \[.+]""")) .assertLogMatch(Regex("""connectStart: ${url.host}/.+ DIRECT""")) .assertLogMatch(Regex("""connectEnd: http/1.1"""))
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 10.2K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt
} } companion object { private const val DEFAULT_DURATION_MILLIS = 1000L * 60 * 60 * 24 // 24 hours. } } companion object { private val PEM_REGEX = Regex("""-----BEGIN ([!-,.-~ ]*)-----([^-]*)-----END \1-----""") /** * Decodes a multiline string that contains both a [certificate][certificatePem] and a
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 21.6K bytes - Viewed (1)