From 6278482ecffcfb5e0a2c8f3637ea698dc65e1480 Mon Sep 17 00:00:00 2001 From: dshukertjr Date: Sat, 27 Apr 2024 10:34:44 +0900 Subject: [PATCH 1/2] chore: add comment about using SSE on the web --- .../functions_client/lib/src/functions_client.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/functions_client/lib/src/functions_client.dart b/packages/functions_client/lib/src/functions_client.dart index fd2cc8cf..f32d5974 100644 --- a/packages/functions_client/lib/src/functions_client.dart +++ b/packages/functions_client/lib/src/functions_client.dart @@ -57,6 +57,16 @@ class FunctionsClient { /// print(val); /// }); /// ``` + /// To stream SSE on the web, you can use custom HTTP client that are + /// 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 invoke( String functionName, { Map? headers, From aed19ac40f7d494a072583750d2305324b4ed5a7 Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 28 Apr 2024 21:02:18 +0900 Subject: [PATCH 2/2] Update packages/functions_client/lib/src/functions_client.dart Co-authored-by: Vinzent --- packages/functions_client/lib/src/functions_client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/functions_client/lib/src/functions_client.dart b/packages/functions_client/lib/src/functions_client.dart index f32d5974..97926f50 100644 --- a/packages/functions_client/lib/src/functions_client.dart +++ b/packages/functions_client/lib/src/functions_client.dart @@ -57,7 +57,7 @@ class FunctionsClient { /// print(val); /// }); /// ``` - /// To stream SSE on the web, you can use custom HTTP client that are + /// 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);