post

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.

Return

a promise of the data

Parameters

url

an URL address

data

data to send

block

an optional block for configuring the request