Builder

class Builder(val statusCode: Int)

Constructors

Link copied to clipboard
fun Builder(statusCode: Int)

Functions

Link copied to clipboard
fun addHeader(name: String, value: String): HttpResponse.Builder
Link copied to clipboard
fun addHeaders(headers: List<HttpHeader>): HttpResponse.Builder
Link copied to clipboard
fun body(bodySource: BufferedSource): HttpResponse.Builder

A streamable body.

fun body(bodyString: ByteString): HttpResponse.Builder

An immutable body. Prefer bodySource so that the response can be streamed.

Link copied to clipboard
fun build(): HttpResponse
Link copied to clipboard
fun headers(headers: List<HttpHeader>): HttpResponse.Builder

Properties

Link copied to clipboard
val statusCode: Int