Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                socketEffect = peek.onRequestBody,
                expectedByteCount = contentLength,
                socket = socket,
              ).buffer()
          requestBodySink.use {
            when {
              peek.doNotReadRequestBody -> {
                hasBody = false // Ignore the body completely.
              }
    
              contentLength != -1L -> {
                hasBody = contentLength > 0L || HttpMethod.permitsRequestBody(request.method)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        assertThat(recordedRequest.body).isNull()
      }
    
      @Test
      fun recordedBodyIsNullWithDoNotRead() {
        server.enqueue(
          MockResponse
            .Builder()
            .doNotReadRequestBody()
            .build(),
        )
        val client = OkHttpClient()
        val request =
          Request(
            url = server.url("/"),
            body = "hello".toRequestBody(),
          )
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Aug 03 22:38:00 UTC 2025
    - 28K bytes
    - Viewed (0)
Back to top