Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Content (0.17 sec)

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

          this.status = "HTTP/1.1 200 OK"
          this.bodyVar = null
          this.streamHandlerVar = null
          this.webSocketListenerVar = null
          this.headers =
            Headers.Builder()
              .add("Content-Length", "0")
          this.trailers = Headers.Builder()
          this.throttleBytesPerPeriod = Long.MAX_VALUE
          this.throttlePeriodNanos = 0L
          this.socketPolicy = KeepOpen
          this.bodyDelayNanos = 0L
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  2. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      fun setBody(body: Buffer) =
        apply {
          setHeader("Content-Length", body.size)
          this.body = body.clone() // Defensive copy.
        }
    
      fun setBody(body: String): MockResponse = setBody(Buffer().writeUtf8(body))
    
      fun setChunkedBody(
        body: Buffer,
        maxChunkSize: Int,
      ) = apply {
        removeHeader("Content-Length")
        headersBuilder.add(CHUNKED_BODY_HEADER)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
Back to top