mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-18 18:51:08 +03:00
fix: Fix web platform issues
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -770,6 +770,24 @@ class RustdeskImpl {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
Future<bool> mainGetProxyStatus({dynamic hint}) {
|
||||
return Future(() => false);
|
||||
}
|
||||
|
||||
Future<void> mainHttpRequest({
|
||||
required String url,
|
||||
required String method,
|
||||
String? body,
|
||||
required String header,
|
||||
dynamic hint,
|
||||
}) {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
Future<String?> mainGetHttpStatus({required String url, dynamic hint}){
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
String mainGetLocalOption({required String key, dynamic hint}) {
|
||||
return js.context.callMethod('getByName', ['option:local', key]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user