RestClient

open class RestClient(block: RestClientConfig.() -> Unit = {})

A HTTP REST client

Constructors

Link copied to clipboard
constructor(block: RestClientConfig.() -> Unit = {})

Functions

Link copied to clipboard
inline fun <T : Any> RestClient.call(url: String, crossinline block: RestRequestConfig<T, dynamic>.() -> Unit = {}): <Error class: unknown class><T>
inline fun <T : Any, V : Any> RestClient.call(url: String, data: V, crossinline block: RestRequestConfig<T, V>.() -> Unit = {}): <Error class: unknown class><T>

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

Link copied to clipboard
fun RestClient.callDynamic(url: String, block: RestRequestConfig<dynamic, dynamic>.() -> Unit = {}): <Error class: unknown class><dynamic>
inline fun <V : Any> RestClient.callDynamic(url: String, data: V, crossinline block: RestRequestConfig<dynamic, V>.() -> Unit = {}): <Error class: unknown class><dynamic>

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

Link copied to clipboard
inline fun <T : Any, V : Any> RestClient.post(url: String, data: V, crossinline block: RestRequestConfig<T, V>.() -> Unit = {}): <Error class: unknown class><T>

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

Link copied to clipboard
inline fun <V : Any> RestClient.postDynamic(url: String, data: V, crossinline block: RestRequestConfig<dynamic, V>.() -> Unit = {}): <Error class: unknown class><dynamic>

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

Link copied to clipboard
fun <T : Any, V : Any> receive(url: String, block: RestRequestConfig<T, V>.() -> Unit = {}): <Error class: unknown class><RestResponse<T>>

Makes a http request to the server, returning the response object.

Link copied to clipboard
inline fun <T : Any> RestClient.request(url: String, crossinline block: RestRequestConfig<T, dynamic>.() -> Unit = {}): <Error class: unknown class><RestResponse<T>>
inline fun <T : Any, V : Any> RestClient.request(url: String, data: V, crossinline block: RestRequestConfig<T, V>.() -> Unit = {}): <Error class: unknown class><RestResponse<T>>

Makes a http request to the server, returning the response object.

Link copied to clipboard
fun RestClient.requestDynamic(url: String, block: RestRequestConfig<dynamic, dynamic>.() -> Unit = {}): <Error class: unknown class><RestResponse<dynamic>>
inline fun <V : Any> RestClient.requestDynamic(url: String, data: V, crossinline block: RestRequestConfig<dynamic, V>.() -> Unit = {}): <Error class: unknown class><RestResponse<dynamic>>

Makes a http request to the server, returning the response object.