EdgeFunction

class EdgeFunction constructor(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

Constructors

Link copied to clipboard
constructor(functionName: String, headers: Headers, supabaseClient: SupabaseClient)

Properties

Link copied to clipboard
Link copied to clipboard
val headers: Headers
Link copied to clipboard

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.