Success

@Serializable
@SerialName(value = "true")
data class Success<T>(val result: T) : Response<T>

Constructors

Link copied to clipboard
constructor(result: T)

Properties

Link copied to clipboard
val ok: Boolean
Link copied to clipboard
val result: T

Functions

Link copied to clipboard
fun <T> Response<T>.getOrNull(): T?

Get response or null on failure.

Link copied to clipboard

Whether the request completed successfully.

Link copied to clipboard
inline fun <T> Response<T>.onFailure(block: (Response.Failure) -> Unit): T?