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.
InvokeFunctionOptions.HttpTimeout (100 seconds by default) covers the request and any error body. Cancel reads of a successful body with their own CancellationToken.FunctionsException.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);
}