C#: Invokes a Supabase Edge Function.

Invokes a Supabase Function. See the guide for details on writing Functions.

Examples

Basic invocation.

var options = new InvokeFunctionOptions
\{
    Headers = new Dictionary<string, string> \{\{ "Authorization", "Bearer 1234" \}\},
    Body = new Dictionary<string, object> \{ \{ "foo", "bar" \} \}
\};

await supabase.Functions.Invoke("hello", options: options);

Modeled invocation

class HelloResponse
\{
    [JsonProperty("name")]
    public string Name \{ get; set; \}
\}

await supabase.Functions.Invoke<HelloResponse>("hello");