Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for HTTP_NO_CONTENT (0.06 sec)

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

          }
    
          HttpURLConnection.HTTP_UNAUTHORIZED -> {
            builder.addHeader("WWW-Authenticate: Basic realm=\"protected area\"")
          }
    
          HttpURLConnection.HTTP_NO_CONTENT, HttpURLConnection.HTTP_RESET -> {
            builder.body("") // We forbid bodies for 204 and 205.
          }
        }
        server.enqueue(builder.build())
        if (responseCode == HttpURLConnection.HTTP_CLIENT_TIMEOUT) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 113.6K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

        assertThat(server.takeRequest().exchangeIndex).isEqualTo(0)
      }
    
      @Test
      fun responseCodeDisagreesWithHeaders() {
        server.enqueue(
          MockResponse(
            code = HttpURLConnection.HTTP_NO_CONTENT,
            body = "This body is not allowed!",
          ),
        )
        assertFailsWith<IOException> {
          getResponse(newRequest("/"))
        }.also { expected ->
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
Back to top