Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for apply (0.15 sec)

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

          this.settings =
            Settings().apply {
              merge(mockResponse.settings)
            }
        }
    
        fun code(code: Int) =
          apply {
            this.code = code
          }
    
        /** Sets the status and returns this. */
        fun status(status: String) =
          apply {
            this.status = status
          }
    
        /**
    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

            else -> "Mock Response"
          }
        return apply { status = "HTTP/1.1 $code $reason" }
      }
    
      fun clearHeaders() =
        apply {
          headersBuilder = Headers.Builder()
        }
    
      fun addHeader(header: String) =
        apply {
          headersBuilder.add(header)
        }
    
      fun addHeader(
        name: String,
        value: Any,
      ) = apply {
        headersBuilder.add(name, value.toString())
      }
    
    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