Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 42 for toHttpUrl (1.77 sec)

  1. okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt

        assumeNetwork()
    
        val call = client.newCall(Request("https://google.com/robots.txt".toHttpUrl()))
    
        call.execute().use { response ->
          assertThat(response.code).isEqualTo(200)
        }
      }
    
      @Test
      fun testRequestInvalid() {
        val call = client.newCall(Request("https://google.invalid/".toHttpUrl()))
    
        try {
          call.execute()
          fail("Request can't succeed")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  2. 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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  3. 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 3.3K 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/UrlComponentEncodingTesterJvm.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import assertk.fail
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    import okhttp3.UrlComponentEncodingTester.Component
    
    fun urlComponentEncodingTesterJvmPlatform(component: Component): UrlComponentEncodingTester.Platform {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  6. native-image-tests/src/main/kotlin/okhttp3/PublicSuffixDatabaseTest.kt

     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isGreaterThan
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.internal.publicsuffix.PublicSuffixDatabase
    import okhttp3.testing.PlatformRule
    import okio.FileSystem
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.extension.RegisterExtension
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 24 09:33:12 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/UrlComponentEncodingTester.kt

        val url = urlString.toHttpUrl()
        val actual = component.encodedValue(url)
        if (actual != expected) {
          fail("Encoding $component $codePoint using $encoding: '$actual' != '$expected'")
        }
      }
    
      private fun testForbidden(
        codePoint: Int,
        codePointString: String,
        component: Component,
      ) {
        val builder = "http://host/".toHttpUrl().newBuilder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  8. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

     * limitations under the License.
     */
    package okhttp3.dnsoverhttps
    
    import java.io.File
    import java.net.UnknownHostException
    import java.security.Security
    import okhttp3.Cache
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.OkHttpClient
    import okhttp3.dnsoverhttps.DohProviders.providers
    import org.conscrypt.OpenSSLProvider
    
    private fun runBatch(
      dnsProviders: List<DnsOverHttps>,
      names: List<String>,
    ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt

    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNotNull
    import assertk.assertions.isNull
    import okhttp3.HttpUrl.Companion.defaultPort
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    import okio.buffer
    import okio.source
    import org.junit.jupiter.params.ParameterizedTest
    import org.junit.jupiter.params.provider.ArgumentsSource
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  10. 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")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1K bytes
    - Viewed (0)
Back to top