Response

data class Response(status: Int, headers: Headers, body: String)

Information sent by a server in response to an HTTP request.

Parameters

status

The HTTP status code provided at the start of the response.

headers

Any key-value pairs included at the start of the response.

body

The main contents of the response.

Constructors

Link copied to clipboard
fun Response(status: Int, headers: Headers, body: String)

Properties

Link copied to clipboard
val body: String
Link copied to clipboard
val headers: Headers
Link copied to clipboard
val isSuccess: Boolean

Whether the status code is in the range 200-299, both inclusive.

Link copied to clipboard
val status: Int