Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for clearHeaders (0.07 sec)

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

      fun tearDown() {
        cache.close()
        fileSystem.checkNoOpenFiles()
      }
    
      @Test
      fun get() {
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .clearHeaders()
            .addHeader("content-type: text/plain")
            .addHeader("content-length", "3")
            .build(),
        )
        val sentAt = System.currentTimeMillis()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

            .body("5;x\r\nABCDE\r\n0\r\n\r\n")
            .clearHeaders()
            .addHeader("Transfer-encoding: chunked")
            .build(),
        )
        getResponse(newRequest("/")).use { response -> assertContent("ABCDE", response) }
      }
    
      @Test
      fun missingChunkBody() {
        server.enqueue(
          MockResponse.Builder()
            .body("5")
            .clearHeaders()
            .addHeader("Transfer-encoding: chunked")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CacheTest.kt

          MockResponse.Builder()
            .body("A")
            .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS))
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .clearHeaders()
            .code(HttpURLConnection.HTTP_NO_CONTENT)
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .body("C")
            .build(),
        )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
Back to top