RestClient
A HTTP REST client
Functions
Link copied to clipboard
inline suspend fun <T : Any> RestClient.call(url: String, crossinline block: RestRequestConfig<T, JsAny>.() -> Unit = {}): T
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.
Link copied to clipboard
suspend fun RestClient.callDynamic(url: String, block: RestRequestConfig<JsAny, JsAny>.() -> Unit = {}): JsAny?
inline suspend fun <V : Any> RestClient.callDynamic(url: String, data: V, crossinline block: RestRequestConfig<JsAny, V>.() -> Unit = {}): JsAny?
Makes a http request to the server, returning data directly.
Link copied to clipboard
inline suspend fun <V : Any> RestClient.postDynamic(url: String, data: V, crossinline block: RestRequestConfig<JsAny, V>.() -> Unit = {}): JsAny?
Makes a http POST request to the server, returning data directly.
Link copied to clipboard
inline suspend fun <T : Any> RestClient.request(url: String, crossinline block: RestRequestConfig<T, JsAny>.() -> Unit = {}): RestResponse<T>
inline suspend fun <T : Any, V : Any> RestClient.request(url: String, data: V, crossinline block: RestRequestConfig<T, V>.() -> Unit = {}): RestResponse<T>
Makes a http request to the server, returning the response object.
Link copied to clipboard
suspend fun RestClient.requestDynamic(url: String, block: RestRequestConfig<JsAny, JsAny>.() -> Unit = {}): RestResponse<JsAny>
inline suspend fun <V : Any> RestClient.requestDynamic(url: String, data: V, crossinline block: RestRequestConfig<JsAny, V>.() -> Unit = {}): RestResponse<JsAny>
Makes a http request to the server, returning the response object.