send WRequest
fun <R> R.sendWRequest(request: R.() -> JsonObject, onResponse: (JsonObject) -> Unit, onConnectionError: (JsonObject) -> Unit? = null)
Deprecated
TO MIGRATE
Method to execute and manage the response of a request
Parameters
request
The request to execute
on Response
The action to execute when a response is returned from the backend
on Connection Error
The action to execute if the request has been failed for a connection error
fun <R> R.sendWRequest(request: R.() -> JsonObject, onSuccess: (JsonObject) -> Unit, onFailure: (JsonObject) -> Unit, onConnectionError: (JsonObject) -> Unit? = null)
Deprecated
TO MIGRATE
Method to execute and manage the response of a request
Parameters
request
The request to execute
on Success
The action to execute if the request has been successful
on Failure
The action to execute if the request has been failed
on Connection Error
The action to execute if the request has been failed for a connection error