-
-
Notifications
You must be signed in to change notification settings - Fork 466
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
For cloudflare workers and deno where there is fetch available in the environment already, currently we need initialise the client like this
const supabase = createClient(
"https://yyy.supabase.co", "xxx", {
fetch: fetch.bind(globalThis),
}
);
Instead we should use the following algorithm to get fetch
- Use the custom fetch option when provided
- Use the global fetch if available
- else use cross-fetch
With Node implementing the fetch standard soon, fetch
is a global we can reasonably assume the existence of in most envionments and only load cross-fetch
as a polyfill. cross-fetch also assumes the presence of XMLHttpRequest
which leads to a lot of errors.
Client libraries to update
- storage-js
- postgrest-js
- realtime-js (doesn't use fetch)
- gotrue-js
soedirgo
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request