Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for hasBody (0.03 sec)

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

        assertFalse(requiresRequestBody("GET"))
      }
    
      @Test
      fun hasBody() {
        val request = Request.Builder().url("http://example.com").build()
        val response =
          Response
            .Builder()
            .code(200)
            .message("OK")
            .request(request)
            .protocol(Protocol.HTTP_2)
            .build()
        assertTrue(hasBody(response))
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                hasBody = false // Ignore the body completely.
              }
    
              contentLength != -1L -> {
                hasBody = contentLength > 0L || HttpMethod.permitsRequestBody(request.method)
                requestBodySink.write(socket.source, contentLength)
              }
    
              chunked -> {
                chunkSizes = mutableListOf()
                hasBody = true
                while (true) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpHeaders.kt

      }
    
      return false
    }
    
    @Deprecated(
      message = "No longer supported",
      level = DeprecationLevel.ERROR,
      replaceWith = ReplaceWith(expression = "response.promisesBody()"),
    )
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 7.2K bytes
    - Viewed (0)
Back to top