Skip to content

Commit

Permalink
chore: Add comment about using SSE on the web (#907)
Browse files Browse the repository at this point in the history
* chore: add comment about using SSE on the web

* Update packages/functions_client/lib/src/functions_client.dart

Co-authored-by: Vinzent <[email protected]>

---------

Co-authored-by: Vinzent <[email protected]>
  • Loading branch information
dshukertjr and Vinzent03 authored Apr 28, 2024
1 parent 7e9b905 commit d4f6e42
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/functions_client/lib/src/functions_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ class FunctionsClient {
/// print(val);
/// });
/// ```
/// To stream SSE on the web, you can use a custom HTTP client that is
/// able to handle SSE such as [fetch_client](https://pub.dev/packages/fetch_client).
/// ```dart
/// final fetchClient = FetchClient(mode: RequestMode.cors);
/// await Supabase.initialize(
/// url: supabaseUrl,
/// anonKey: supabaseKey,
/// httpClient: fetchClient,
/// );
/// ```
Future<FunctionResponse> invoke(
String functionName, {
Map<String, String>? headers,
Expand Down

0 comments on commit d4f6e42

Please sign in to comment.