Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  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: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. okhttp/src/main/kotlin/okhttp3/Request.kt

         */
        open fun url(url: String): Builder {
          return url(canonicalUrl(url).toHttpUrl())
        }
    
        /**
         * Sets the URL target of this request.
         *
         * @throws IllegalArgumentException if the scheme of [url] is not `http` or `https`.
         */
        open fun url(url: URL) = url(url.toString().toHttpUrl())
    
        /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:17:44 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  10. 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)
Back to top