fix: Fix web platform issues

This commit is contained in:
yuluo
2024-04-24 01:42:14 +08:00
parent 38a33ea9b0
commit 0496adf6cf
4 changed files with 24 additions and 9 deletions

View File

@@ -14,10 +14,7 @@ class HttpService {
dynamic body,
}) async {
headers ??= {'Content-Type': 'application/json'};
// For web platforms
if (kIsWeb) {
return await _pollFultterHttp(url, method, headers: headers, body: body);
}
// Determine if there is currently a proxy setting, and if so, use FFI to call the Rust HTTP method.
final isProxy = await bind.mainGetProxyStatus();