kvision / pl.treksoft.kvision.remote / CallAgent

CallAgent

(js) open class CallAgent

An agent responsible for remote calls.

Constructors

(js)

<init>

An agent responsible for remote calls.

CallAgent()

Functions

(js)

jsonRpcCall

Makes an JSON-RPC call to the remote server.

fun jsonRpcCall(url: String, data: List<String?> = listOf(), method: HttpMethod = HttpMethod.POST, beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<String>
(js)

remoteCall

Makes a remote call to the remote server.

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