C#: Set a request timeout

Sets a time limit on Database requests. A request that runs longer than the limit, retries included, is cancelled.

Examples

Set a timeout on the Supabase client

var options = new Supabase.SupabaseOptions
{
    PostgrestTimeout = TimeSpan.FromSeconds(10)
};

var supabase = new Supabase.Client(url, key, options);
await supabase.InitializeAsync();

Set a timeout on a standalone Postgrest client

var client = new Supabase.Postgrest.Client(url, new Supabase.Postgrest.ClientOptions
{
    Timeout = TimeSpan.FromSeconds(10)
});