From c7169d6e9dec101fc5523f84766b6fd0c3ecb656 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 16 Feb 2019 23:29:42 +0100 Subject: API documentation for KVision 0.0.25 --- .../-call-agent/index.html | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'api/pl.treksoft.kvision.remote/-call-agent/index.html') diff --git a/api/pl.treksoft.kvision.remote/-call-agent/index.html b/api/pl.treksoft.kvision.remote/-call-agent/index.html index 041e1ef1..650b46ef 100644 --- a/api/pl.treksoft.kvision.remote/-call-agent/index.html +++ b/api/pl.treksoft.kvision.remote/-call-agent/index.html @@ -29,10 +29,26 @@ +

call

+ + +fun <T : Any> call(url: String, data: dynamic = null, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null, transform: (dynamic) -> dynamic = null): Promise<T> +

Helper inline function to automatically get deserializer for the result value with dynamic data.

+fun <V : Any> call(url: String, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null): Promise<dynamic>
+fun <T : Any, V : Any> call(url: String, data: V, deserializer: DeserializationStrategy<T>, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null, transform: (dynamic) -> dynamic = null): Promise<T> +

Helper inline function to automatically get serializer for the data.

+fun <T : Any, V : Any> call(url: String, serializer: SerializationStrategy<V>, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null, transform: (dynamic) -> dynamic = null): Promise<T> +

Helper inline function to automatically deserializer for the result value with typed data.

+fun <T : Any, V : Any> call(url: String, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null, transform: (dynamic) -> dynamic = null): Promise<T> +

Helper inline function to automatically get serializer for the data and deserializer for the result value.

+ + + +

jsonRpcCall

-fun jsonRpcCall(url: String, data: List<String?> = listOf(), method: RpcHttpMethod = RpcHttpMethod.POST): Promise<String> +fun jsonRpcCall(url: String, data: List<String?> = listOf(), method: HttpMethod = HttpMethod.POST): Promise<String>

Makes an JSON-RPC call to the remote server.

@@ -41,7 +57,10 @@

remoteCall

-fun remoteCall(url: String, data: dynamic = null, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null): Promise<dynamic> +fun remoteCall(url: String, data: dynamic = null, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null): Promise<dynamic>
+fun <T : Any> remoteCall(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<T>
+fun <V : Any> remoteCall(url: String, serializer: SerializationStrategy<V>, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null): Promise<dynamic>
+fun <T : Any, V : Any> remoteCall(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<T>

Makes a remote call to the remote server.

-- cgit