For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

C#: Invoke a Supabase Edge Function and stream the response

Invokes a Supabase Function and returns the HttpResponseMessage as soon as the response headers arrive, so the body can be read as it is produced.

Examples

Read a streamed response

using var response = await supabase.Functions.InvokeStream("stream-numbers");
using var stream = await response.Content.ReadAsStreamAsync();
using var reader = new StreamReader(stream);

while (await reader.ReadLineAsync() is { } line)
{
    Console.WriteLine(line);
}