Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for reportedContentLength (0.14 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http/ExchangeCodec.kt

       * response code. Otherwise this method never returns null.
       */
      @Throws(IOException::class)
      fun readResponseHeaders(expectContinue: Boolean): Response.Builder?
    
      @Throws(IOException::class)
      fun reportedContentLength(response: Response): Long
    
      @Throws(IOException::class)
      fun openResponseBodySource(response: Response): Source
    
      /** Returns the trailers after the HTTP response. May be empty. */
      @Throws(IOException::class)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2ExchangeCodec.kt

        return if (expectContinue && responseBuilder.code == HTTP_CONTINUE) {
          null
        } else {
          responseBuilder
        }
      }
    
      override fun reportedContentLength(response: Response): Long {
        return when {
          !response.promisesBody() -> 0L
          else -> response.headersContentLength()
        }
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

      }
    
      @Throws(IOException::class)
      fun openResponseBody(response: Response): ResponseBody {
        try {
          val contentType = response.header("Content-Type")
          val contentLength = codec.reportedContentLength(response)
          val rawSource = codec.openResponseBodySource(response)
          val source = ResponseBodySource(rawSource, contentLength)
          return RealResponseBody(contentType, contentLength, source.buffer())
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.2K bytes
    - Viewed (0)
Back to top