-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnsupportedError occurs when using the HTTP package on the Supabase platform #34
Comments
Closed my related issue and wanted to add @htsuruo's very cool example repository. May be very useful in diagnosing this -- https://github.com/HTsuruo/dart-edge-supabase-playground/tree/main Thanks for the guide and workaround too 🙏 |
Maybe an override of dart:html with https://pub.dev/packages/universal_html would work? |
If fetch is conforms to browsers' one you may try to use fetch_client, it is independent of io or html, using only js interop to call global fetch function. |
Tried.
|
Sounds like the only way to get OpenAI's API to work atm is to call another function which handles the call and just returns the result. https://supabase.com/docs/reference/javascript/functions-invoke Which defeats the point of using Dart Edge functions at all, and one may as well just use Deno to begin with. |
I am running on Supabase Edge.
As far as I understand from Fetching Data, it is possible to fetch data using two approaches, Fetch and HTTP Package.
However, the sample does not describe how to use it with platforms such as Supabase or Vercel using
http.runWithClient
.When I tried writing the following code, an
UnsupportedError
occurred:Reproducible code
Is my usage incorrect? Or is the HTTP package not yet supported in Supabase?
It was available with the Fetch API.
I want to use packages like dart_openai | Dart Package, but since their internal implementation depends on
http
, I cannot use them without resolving the above issue.Thanks.
The text was updated successfully, but these errors were encountered: