call

inline suspend fun <T : Any> RestClient.call(url: String, crossinline block: RestRequestConfig<T, JsAny>.() -> Unit = {}): T

Makes a http request to the server, returning data directly.

Return

the data

Parameters

url

a URL address

block

an optional block for configuring the request


inline suspend fun <T : Any, V : Any> RestClient.call(url: String, data: V, crossinline block: RestRequestConfig<T, V>.() -> Unit = {}): T

Makes a http request to the server, returning data directly.

Return

the data

Parameters

url

a URL address

data

data to send

block

an optional block for configuring the request