sendRequestAsyncHandlers

suspend fun <R : Requester> R.sendRequestAsyncHandlers(    request: suspend R.() -> JsonObject,     onResponse: suspend (JsonObject) -> Unit,     onConnectionError: suspend (JsonObject) -> Unit? = null)

Method used to execute and handle the response of the request

Parameters

request

The request to execute

onResponse

The asynchronous callback to execute when a response is returned from the backend

onConnectionError

The asynchronous callback to execute if the request has been failed for a connection error


suspend fun <R : Requester> R.sendRequestAsyncHandlers(    request: suspend R.() -> JsonObject,     onSuccess: suspend (JsonObject) -> Unit,     onFailure: suspend (JsonObject) -> Unit,     onConnectionError: suspend (JsonObject) -> Unit? = null)

Method used to execute and handle the response of the request

Parameters

request

The request to execute

onSuccess

The asynchronous callback to execute if the request has been successful

onFailure

The asynchronous callback to execute if the request has been failed

onConnectionError

The asynchronous callback to execute if the request has been failed for a connection error