Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for toHttpUrlOrNull (0.12 sec)

  1. okhttp/src/test/java/okhttp3/UrlComponentEncodingTesterJvm.kt

     * 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 {
      return when (component) {
        Component.USER ->
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/WebPlatformToAsciiTest.kt

     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import kotlin.test.Test
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    
    /** Runs the web platform ToAscii tests. */
    class WebPlatformToAsciiTest {
      @Suppress("ktlint:standard:max-line-length")
      val knownFailures =
        setOf(
          // OkHttp rejects empty labels.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

        platform.assumeNotGraalVMImage()
        val javaNetUrl = URL("mailto:******@****.***")
        assertThat(javaNetUrl.toHttpUrlOrNull()).isNull()
      }
    
      @Test
      fun fromUri() {
        val uri = URI("http://username:password@host/path?query#fragment")
        val httpUrl = uri.toHttpUrlOrNull()
        assertThat(httpUrl.toString())
          .isEqualTo("http://username:password@host/path?query#fragment")
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

         * other protocol.
         */
        @JvmStatic
        @JvmName("get")
        fun URL.toHttpUrlOrNull(): HttpUrl? = toString().toHttpUrlOrNull()
    
        @JvmStatic
        @JvmName("get")
        fun URI.toHttpUrlOrNull(): HttpUrl? = toString().toHttpUrlOrNull()
    
        @JvmName("-deprecated_get")
        @Deprecated(
          message = "moved to extension function",
          replaceWith =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 09 12:33:05 UTC 2024
    - 63.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt

    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
    
    /** Runs the web platform URL tests against Java URL models.  */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/RecordedRequest.kt

    import java.net.Socket
    import javax.net.ssl.SSLSocket
    import okhttp3.Handshake
    import okhttp3.Handshake.Companion.handshake
    import okhttp3.Headers
    import okhttp3.HttpUrl
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    import okhttp3.TlsVersion
    import okio.Buffer
    
    class RecordedRequest {
      val requestLine: String
      val headers: Headers
      val chunkSizes: List<Int>
      val bodySize: Long
      val body: Buffer
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/RecordedRequest.kt

    import javax.net.ssl.SSLSocket
    import okhttp3.ExperimentalOkHttpApi
    import okhttp3.Handshake
    import okhttp3.Handshake.Companion.handshake
    import okhttp3.Headers
    import okhttp3.HttpUrl
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    import okhttp3.internal.platform.Platform
    import okio.Buffer
    
    /** An HTTP request that came into the mock web server. */
    @ExperimentalOkHttpApi
    class RecordedRequest(
      val requestLine: String,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/Cache.kt

    import java.security.cert.CertificateEncodingException
    import java.security.cert.CertificateException
    import java.security.cert.CertificateFactory
    import java.util.TreeSet
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    import okhttp3.MediaType.Companion.toMediaTypeOrNull
    import okhttp3.internal.EMPTY_HEADERS
    import okhttp3.internal.cache.CacheRequest
    import okhttp3.internal.cache.CacheStrategy
    import okhttp3.internal.cache.DiskLruCache
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val topPrivateDomain: String? = httpUrl.topPrivateDomain()
        val resolve: HttpUrl? = httpUrl.resolve("")
        val getFromUrl: HttpUrl? = URL("").toHttpUrlOrNull()
        val getFromUri: HttpUrl? = URI("").toHttpUrlOrNull()
        val parse: HttpUrl? = "".toHttpUrlOrNull()
        val defaultPort: Int = HttpUrl.defaultPort("")
      }
    
      @Test
      fun httpUrlBuilder() {
        var builder: HttpUrl.Builder = HttpUrl.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

    import mockwebserver3.junit5.internal.MockWebServerInstance
    import okhttp3.Credentials.basic
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.TestUtil.assertSuppressed
    import okhttp3.internal.RecordingAuthenticator
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
Back to top