Invokes a Supabase Edge Function.
Invokes a Supabase Function. See the guide for details on writing Functions.
- Requires an Authorization header.
- Invoke params generally match the Fetch API spec.
Parameters
functionName
REQUIRED
StringThe name of the function to invoke.
headers
Optional
Map<String, String>Custom headers to send with the request.
body
Optional
Map<String, String>The body of the request.
method
Optional
HttpMethodHTTP method of the request. Defaults to POST.
final res = await supabase.functions.invoke('hello', body: {'foo': 'baa'});
final data = res.data;