Response

class Response(val request: Request, httpResponse: HttpResponse)

Class for a Response. A Response represents a response received from a network request.

Constructors

Link copied to clipboard
constructor(request: Request, httpResponse: HttpResponse)

Properties

Link copied to clipboard

The request that was sent to get this response.

Functions

Link copied to clipboard
suspend fun body(): String

Returns the body of the response.

Link copied to clipboard

Returns the cookies from the response.

Link copied to clipboard
fun header(name: String): String?

Returns the value of a specific header from the response.

Link copied to clipboard
fun status(): Int

Returns the status code of the response.