Invoke Function
The Invoke Function
method is used to run edge functions in Supabase. Edge functions allow you to add more customization to your Supabase app.
NOTE
Edge Functions and Database Functions in Supabase are not the same. Wized only invokes edge functions at the moment.
To make a request to invoke an edge function, follow these steps:
- First, ensure you have an edge function deployed to your Supabase app. Following Supabase's guide will allow you to get a sample edge function in your functions menu.
- Open the request panel and click on the
+
button to add a new request. - Fill in an appropriate name for the request and select the Supabase app to be used for the request. Then, under method, choose
Invoke function
. - Scroll downwards to fill in the edge function name and choose the type of method to access it, whether it's
GET
,POST
,PUT
,PATCH
, orDELETE
. - (Optional) Fill in headers if the edge function requires them.
- (Optional) Fill in the body key-value pair if the edge function requires a body. This is the case with
POST
,PUT
,PATCH
, andDELETE
HTTP method types.