Open
Description
Describe the bug
When passing in a custom Http Client to Supabase's instantiation, functions.invoke fail with a 400 error.
FunctionException(status: 400, details: <html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
, reasonPhrase: )
To Reproduce
final engine = CronetEngine.build(
cacheMode: CacheMode.memory,
cacheMaxSize: _maxCacheSize,
enableHttp2: true,
);
final client = CronetClient.fromCronetEngine(engine);
await Supabase.initialize(
url: Config.supabase.url,
anonKey: Config.supabase.anonKey,
authOptions: const FlutterAuthClientOptions(authFlowType: AuthFlowType.implicit),
httpClient: client,
);
Supabase.instance.client.functions.invoke('call-edge-function')
Expected behavior
I expect the function to be correctly invoked without an errors, just like it happens when no or a regular HttpClient is passed in
Version (please complete the following information):
supabase_flutter 2.8.3
supabase 2.6.2
functions_client 2.4.0
gotrue 2.11.1
postgrest 2.4.1
realtime_client 2.4.1
storage_client 2.3.0