Skip to content

FluxbaseFunctions

//fluxbase-kotlin/io.github.nimbleflux.fluxbase.functions/FluxbaseFunctions

[jvm]
class FluxbaseFunctions(http: FluxbaseHttpClient)

Edge Functions module — port of FluxbaseFunctions from sdk/src/functions.ts.

Invokes Fluxbase edge functions via POST /api/v1/functions/{name}/invoke.

Usage:

val result = client.functions.invoke<MyData>("my-fn", body = mapOf("key" to "value"), namespace = "wayli")
FluxbaseFunctions [jvm]
constructor(http: FluxbaseHttpClient)
Name Summary
invoke [jvm]
inline suspend fun <reified T> invoke(name: String, body: Any? = null, method: String = "POST", namespace: String? = null, headers: Map<String, String> = emptyMap()): FluxbaseResponse<T>
Invoke an edge function. Port of invoke() in functions.ts:77.
invokeJson [jvm]
suspend fun invokeJson(name: String, body: Any? = null, method: String = "POST", namespace: String? = null): FluxbaseResponse<JsonElement>
Invoke a function returning raw JSON (for untyped responses).