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
fun <T> Response(    content: T,     status: Int,     headers: Map<String, List<String>>)

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
fun getHeaders(name: String): List<String>

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.

Properties

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