Builder

abstract class Builder

A builder to create a Response instance.

Since

200.2.0

Functions

Link copied to clipboard

Adds a Request.Header. Existing headers with the same name will not be overridden.

abstract fun addHeader(name: String, value: String): Response.Builder

Adds a header with the specified name and value. Existing headers with the same name will not be overridden.

Link copied to clipboard
abstract fun body(body: Response.Body): Response.Builder

Sets the Response.Body.

Link copied to clipboard
abstract fun build(): Response

Creates a new Response instance.

Link copied to clipboard
abstract fun code(code: Int): Response.Builder

Sets the HTTP response code of the new Response.

Link copied to clipboard
abstract fun request(request: Request): Response.Builder

Sets the Request associated with the new Response.