Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testRequestInvalid (0.19 sec)

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

        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")
        } catch (ioe: IOException) {
    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)
Back to top