Skip to content

invoke

//fluxbase-kotlin/io.github.nimbleflux.fluxbase.rpc/FluxbaseRpc/invoke

[jvm]
suspend fun invoke(name: String, params: Map<String, Any?>? = null, options: RpcInvokeOptions = RpcInvokeOptions()): FluxbaseResponse<RpcInvokeResponse>

Invoke an RPC procedure. POSTs /api/v1/rpc/{namespace}/{name}. Port of invoke() in rpc.ts:111.

Params encode as real JSON — lists as arrays, maps as objects, @Serializable dataclasses via their generated serializer — matching the TypeScript SDK’s JSON.stringify of the whole params object.

jvm

name the procedure name.
params parameters to pass to the procedure.
options namespace (default "default"), async, per-request timeout (fails with a 408 "Request timeout" error when it elapses).