- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for toHttpUrl (0.06 sec)
-
okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt
assertThat("https://co.uk".toHttpUrl().topPrivateDomain()).isNull() assertThat("https://square".toHttpUrl().topPrivateDomain()).isNull() assertThat("https://栃木.jp".toHttpUrl().topPrivateDomain()).isNull() assertThat("https://xn--4pvxs.jp".toHttpUrl().topPrivateDomain()).isNull() assertThat("https://localhost".toHttpUrl().topPrivateDomain()).isNull() assertThat("https://127.0.0.1".toHttpUrl().topPrivateDomain()).isNull()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookieTest.kt
assertThat(cookie.matches("http://square.com".toHttpUrl())).isFalse() } @Test fun idnDomainMatches() { val cookie = parse("http://☃.net/".toHttpUrl(), "a=b; domain=☃.net") assertThat(cookie!!.matches("http://☃.net/".toHttpUrl())).isTrue() assertThat(cookie.matches("http://xn--n3h.net/".toHttpUrl())).isTrue() assertThat(cookie.matches("http://www.☃.net/".toHttpUrl())).isTrue()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 24.3K bytes - Viewed (0) -
native-image-tests/src/main/kotlin/okhttp3/SampleTest.kt
*/ package okhttp3 import assertk.assertThat import assertk.assertions.isEqualTo import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import okhttp3.HttpUrl.Companion.toHttpUrl import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.RegisterExtension import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ArgumentsSource class SampleTest {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp-android/src/test/kotlin/okhttp3/android/RobolectricOkHttpClientTest.kt
import assertk.assertions.isEqualTo import assertk.assertions.isNotNull import assertk.assertions.isNull import java.net.InetAddress import java.net.UnknownHostException import okhttp3.Cache import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient import okhttp3.Request import okio.Path.Companion.toPath import okio.fakefilesystem.FakeFileSystem import org.junit.AssumptionViolatedException import org.junit.Before
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 2.5K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.kt
.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 { return DnsOverHttps.Builder() .client(bootstrapClient) .url("https://dns.google/dns-query".toHttpUrl()) .bootstrapDnsHosts(getByIp("8.8.4.4"), getByIp("8.8.8.8"))
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/src/test/java/okhttp3/RequestTest.kt
import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.asRequestBody import okhttp3.RequestBody.Companion.toRequestBody import okio.Buffer import okio.ByteString.Companion.encodeUtf8 import org.junit.jupiter.api.Test class RequestTest { @Test fun constructor() { val url = "https://example.com/".toHttpUrl() val body = "hello".toRequestBody()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
val cookieJar = JavaNetCookieJar(cookieManager) val url1 = "https://api.squareup.com/".toHttpUrl() cookieJar.saveFromResponse(url1, listOf(parse(url1, "a=android; Domain=api.squareup.com")!!)) val url2 = "https://www.squareup.com/".toHttpUrl() val actualCookies = cookieJar.loadForRequest(url2) assertThat(actualCookies).isEmpty() } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13K bytes - Viewed (0) -
android-test-app/src/androidTest/kotlin/okhttp/android/testapp/PublicSuffixDatabaseTest.kt
import assertk.assertions.isEqualTo import okhttp3.HttpUrl.Companion.toHttpUrl import org.junit.Test /** * Run with "./gradlew :android-test-app:connectedCheck -PandroidBuild=true" and make sure ANDROID_SDK_ROOT is set. */ class PublicSuffixDatabaseTest { @Test fun testTopLevelDomain() { assertThat("https://www.google.com/robots.txt".toHttpUrl().topPrivateDomain()).isEqualTo("google.com") }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Request.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:17:44 UTC 2024 - 10.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostString.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.recipes.kt import java.io.IOException import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody class PostString { private val client = OkHttpClient()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0)