Table of Contents

Class Client

Namespace
Supabase.Functions
Assembly
Supabase.Functions.dll
public class Client : IFunctionsClient, IGettableHeaders
Inheritance
Client
Implements
Inherited Members

Constructors

Client(string)

Initializes a functions client

public Client(string baseUrl)

Parameters

baseUrl string

Properties

GetHeaders

Function that can be set to return dynamic headers.

Headers specified in the method parameters will ALWAYS take precedence over headers returned by this function.

public Func<Dictionary<string, string>>? GetHeaders { get; set; }

Property Value

Func<Dictionary<string, string>>

Methods

Invoke(string, string?, InvokeFunctionOptions?)

Invokes a function and returns the Text content of the response.

public Task<string> Invoke(string functionName, string? token = null, Client.InvokeFunctionOptions? options = null)

Parameters

functionName string

Function Name, will be appended to BaseUrl

token string

Anon Key.

options Client.InvokeFunctionOptions

Options

Returns

Task<string>

Invoke<T>(string, string?, InvokeFunctionOptions?)

Invokes a function and returns a JSON Deserialized object according to the supplied generic Type T

public Task<T?> Invoke<T>(string functionName, string? token = null, Client.InvokeFunctionOptions? options = null) where T : class

Parameters

functionName string

Function Name, will be appended to BaseUrl

token string

Anon Key.

options Client.InvokeFunctionOptions

Options

Returns

Task<T>

Type Parameters

T

RawInvoke(string, string?, InvokeFunctionOptions?)

Returns an HttpContent response, allowing for coersion into Streams, Strings, and byte[]

public Task<HttpContent> RawInvoke(string functionName, string? token = null, Client.InvokeFunctionOptions? options = null)

Parameters

functionName string

Function Name, will be appended to BaseUrl

token string

Anon Key.

options Client.InvokeFunctionOptions

Options

Returns

Task<HttpContent>