- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for topPrivateDomain (0.08 sec)
-
android-test/src/test/kotlin/okhttp/android/test/BaseOkHttpClientUnitTest.kt
assertThat(response.cacheResponse).isNotNull() } } @Test open fun testPublicSuffixDb() { val httpUrl = "https://www.google.co.uk".toHttpUrl() assertThat(httpUrl.topPrivateDomain()).isEqualTo("google.co.uk") } private fun assumeNetwork() { try { InetAddress.getByName("www.google.com") } catch (uhe: UnknownHostException) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 22 20:03:31 UTC 2025 - 2.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java
InternetDomainName googleDomain = InternetDomainName.from("google.com"); assertEquals(googleDomain, googleDomain.topPrivateDomain()); assertEquals(googleDomain, googleDomain.child("mail").topPrivateDomain()); assertEquals(googleDomain, googleDomain.child("foo.bar").topPrivateDomain()); } public void testInvalidTopPrivateDomain() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 17.5K bytes - Viewed (0) -
native-image-tests/src/test/kotlin/okhttp3/nativeimage/PublicSuffixDatabaseTest.kt
import org.junit.jupiter.api.Test class PublicSuffixDatabaseTest { @Test fun testResourcesLoaded() { val url = "https://api.twitter.com".toHttpUrl() assertThat(url.topPrivateDomain()).isEqualTo("twitter.com") }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jul 04 08:15:11 UTC 2025 - 964 bytes - Viewed (0) -
android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt
val client = OkHttpClient() // Ensure we are compiling against the right variant println(AndroidPlatform.isSupported) val url = "https://github.com/square/okhttp".toHttpUrl() println(url.topPrivateDomain()) client.newCall(Request(url)).enqueue( object : Callback { override fun onFailure( call: Call, e: IOException, ) { println("failed: $e")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Aug 19 08:10:39 UTC 2025 - 1.7K bytes - Viewed (0) -
android-test/src/test/kotlin/okhttp/android/test/DisabledInitialiserTest.kt
Platform.resetForTests() PlatformRegistry.applicationContext = null } @Test fun testWithoutContext() { val httpUrl = "https://www.google.co.uk".toHttpUrl() assertFailure { httpUrl.topPrivateDomain() }.all { hasMessage("Unable to load PublicSuffixDatabase.list resource.") cause().isNotNull().all { hasMessage( "Platform applicationContext not initialized. " +
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 16:25:39 UTC 2025 - 2.1K bytes - Viewed (0) -
android/guava/src/com/google/common/net/InternetDomainName.java
* controls. * * @throws IllegalStateException if this domain does not end with a public suffix * @since 6.0 */ public InternetDomainName topPrivateDomain() { if (isTopPrivateDomain()) { return this; } checkState(isUnderPublicSuffix(), "Not under a public suffix: %s", name); return ancestor(publicSuffixIndex() - 1); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27.9K bytes - Viewed (0) -
CHANGELOG.md
attempt multiple TLS handshakes for the same call concurrently. * Fix: Don't crash loading the public suffix database in GraalVM native images. The function `HttpUrl.topPrivateDomain()` uses a resource file to identify private domains, but we didn't include this file on GraalVM. ## Version 5.0.0-alpha.4 _2022-02-01_
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 19:32:33 UTC 2025 - 31.6K bytes - Viewed (1) -
okhttp/api/jvm/okhttp.api
public final fun redact ()Ljava/lang/String; public final fun resolve (Ljava/lang/String;)Lokhttp3/HttpUrl; public final fun scheme ()Ljava/lang/String; public fun toString ()Ljava/lang/String; public final fun topPrivateDomain ()Ljava/lang/String; public final fun uri ()Ljava/net/URI; public final fun url ()Ljava/net/URL; public final fun username ()Ljava/lang/String; } public final class okhttp3/HttpUrl$Builder {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 69.4K bytes - Viewed (0) -
okhttp/api/android/okhttp.api
public final fun redact ()Ljava/lang/String; public final fun resolve (Ljava/lang/String;)Lokhttp3/HttpUrl; public final fun scheme ()Ljava/lang/String; public fun toString ()Ljava/lang/String; public final fun topPrivateDomain ()Ljava/lang/String; public final fun uri ()Ljava/net/URI; public final fun url ()Ljava/net/URL; public final fun username ()Ljava/lang/String; } public final class okhttp3/HttpUrl$Builder {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 69.4K bytes - Viewed (0)