Invokes a Supabase Function. See the guide for details on writing Functions.
The name of the function to invoke.
Custom headers to send with the request.
The body of the request.
HTTP method of the request. Defaults to POST.
final res = await supabase.functions.invoke('hello', body: \{'foo': 'baa'\});
final data = res.data;
final res = await supabase.functions.invoke(
'hello',
body: \{'foo': 'baa'\},
responseType: ResponseType.text,
);
final data = res.data;
final res = await supabase.functions.invoke(
'hello',
body: \{'foo': 'baa'\},
headers: \{
'Authorization': 'Bearer $\{supabase.auth.currentSession?.accessToken\}'
\},
);