Response

class Response<T>(val content: T, val status: Int, val headers: Map<String, List<String>>)

Response from a HTTP class in the ApiClient.

Constructors

Link copied to clipboard
constructor(content: T, status: Int, headers: Map<String, List<String>>)

Properties

Link copied to clipboard
val content: T
Link copied to clipboard
Link copied to clipboard
val status: Int

Functions

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

Get a header by name. If multiple headers with the name exist the first is returned. Use getHeaders to get all headers with name.

Link copied to clipboard

Get multiple headers sharing the same name. Use getHeader to retrieve the first occurrence.

Link copied to clipboard
operator fun getValue(thisRef: Any?, property: KProperty<*>): T

Get the response content using property delegation.