Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for toHttpUrl (0.13 sec)

  1. 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: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 24.3K bytes
    - Viewed (0)
  2. 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: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 11.9K bytes
    - Viewed (0)
  3. 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: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 1.8K bytes
    - Viewed (0)
  4. 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: 2024-06-16 04:42
    - Last Modified: 2023-12-23 10:26
    - 3.8K bytes
    - Viewed (0)
  5. 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: 2024-06-16 04:42
    - Last Modified: 2024-04-10 19:46
    - 2.5K bytes
    - Viewed (0)
  6. 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: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 1K bytes
    - Viewed (0)
  7. 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: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 16.4K bytes
    - Viewed (0)
  8. 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: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 1.6K bytes
    - Viewed (0)
  9. 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: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 13K bytes
    - Viewed (0)
  10. container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt

     */
    package okhttp3.containers
    
    import assertk.assertThat
    import assertk.assertions.contains
    import javax.net.ssl.TrustManagerFactory
    import javax.net.ssl.X509TrustManager
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import org.junit.jupiter.api.Test
    import org.mockserver.client.MockServerClient
    import org.mockserver.configuration.Configuration
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-04-05 03:30
    - 3.3K bytes
    - Viewed (0)
Back to top