Invokes a Supabase Function. See the guide for details on writing Functions.
supabase.functions.invoke("function_name")
supabase.functions.invoke(
function = "function_name",
body = buildJsonObject \{
put("foo", "bar")
\},
headers = Headers.build \{
append(HttpHeaders.ContentType, "application/json")
\}
)
val function = supabase.functions.buildEdgeFunction(
function = "function",
headers = Headers.build \{
/*Default headers*/
//when you are sending a body you may want to add this header:
append(HttpHeaders.ContentType, "application/json")
\}
)
//invoke it:
function()
//invoke it with a body:
function(body)
//invoke it with custom request options:
function(body) \{
header("Header", "Value")
parameter("Key", "Value") //url parameter
\}