Invokes a Supabase Edge Function.
Invokes a function
Invokes a Supabase Edge Function.
- Requires an Authorization header.
- Invoke params generally match the Fetch API spec.
Parameters
functionName
REQUIRED
stringThe name of the Function to invoke.
options
Optional
FunctionInvokeOptionsOptions for invoking the Function.
body
Optional
objectThe body of the request.
headers
Optional
objectObject representing the headers to send with the request.
method
Optional
"POST" | "GET" | "PUT" | "PATCH" | "DELETE"The HTTP verb of the request
const { data, error } = await supabase.functions.invoke('hello', {
body: JSON.stringify({ foo: 'bar' })
})