fun remoteRequest(url: String, data: dynamic = null, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<Response<dynamic>>
Makes a remote call to the remote server.
contentType
- a content type of the request
beforeSend
- a function to set request parameters
Return
a promise of the response
fun <T : Any> remoteRequest(url: String, data: dynamic = null, deserializer: DeserializationStrategy<T>, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null): Promise<Response<T>>
Makes a remote call to the remote server.
deserializer
- a deserializer for the result value
contentType
- a content type of the request
beforeSend
- a function to set request parameters
transform
- a function to transform the result of the call
Return
a promise of the response
fun <V : Any> remoteRequest(url: String, serializer: SerializationStrategy<V>, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<Response<dynamic>>
Makes a remote call to the remote server.
contentType
- a content type of the request
beforeSend
- a function to set request parameters
Return
a promise of the response
fun <T : Any, V : Any> remoteRequest(url: String, serializer: SerializationStrategy<V>, data: V, deserializer: DeserializationStrategy<T>, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null): Promise<Response<T>>
Makes a remote call to the remote server.
deserializer
- a deserializer for the result value
contentType
- a content type of the request
beforeSend
- a function to set request parameters
transform
- a function to transform the result of the call
Return
a promise of the response