EdgeFunction
class EdgeFunction(val functionName: String, val headers: Headers, val supabaseClient: SupabaseClient)(source)
Represents a reusable edge function. Can be created using Functions.buildEdgeFunction
Parameters
functionName
The name of the function
headers
Headers to add to the request
supabaseClient
The supabase client to use
Functions
Link copied to clipboard
inline suspend operator fun invoke(crossinline requestOverride: HttpRequestBuilder.() -> Unit = {}): HttpResponse
Invokes the edge function
inline suspend operator fun <T : Any> invoke(body: T, crossinline requestOverride: HttpRequestBuilder.() -> Unit = {}): HttpResponse
Invokes the edge function Note, if you want to serialize body to json, you need to add the HttpHeaders.ContentType header yourself.
Link copied to clipboard
Invokes the edge function that returns Server-Sent Events (SSE) and returns a Flow of FunctionServerSentEvent.
Link copied to clipboard
inline suspend fun prepareInvoke(crossinline requestOverride: HttpRequestBuilder.() -> Unit = {}): HttpStatement
Prepares an invocation of the edge function, returning an HttpStatement for streaming or other advanced response handling.