Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for negativeStatusCodeThrowsIllegalStateException (0.14 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/ResponseCommonTest.kt

        val p2 = response.peekBody(2)
        assertThat(response.body.string()).isEqualTo("abcdef")
        assertThat(p1.string()).isEqualTo("abcd")
        assertThat(p2.string()).isEqualTo("ab")
      }
    
      @Test fun negativeStatusCodeThrowsIllegalStateException() {
        assertFailsWith<IllegalStateException> {
          newResponse(responseBody("set status code -1"), -1)
        }
      }
    
      @Test fun zeroStatusCodeIsValid() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.6K bytes
    - Viewed (0)
Back to top