request

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

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

Return

a promise of the data

Parameters

url

an URL address

block

an optional block for configuring the request


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.

Return

a promise of the data

Parameters

url

an URL address

data

data to send

block

an optional block for configuring the request