mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-12 22:51:27 +03:00
fix: web platforms
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import '../models/platform_model.dart';
|
import '../models/platform_model.dart';
|
||||||
export 'package:http/http.dart' show Response;
|
export 'package:http/http.dart' show Response;
|
||||||
@@ -13,6 +14,10 @@ class HttpService {
|
|||||||
dynamic body,
|
dynamic body,
|
||||||
}) async {
|
}) async {
|
||||||
headers ??= {'Content-Type': 'application/json'};
|
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.
|
// Determine if there is currently a proxy setting, and if so, use FFI to call the Rust HTTP method.
|
||||||
final isProxy = await bind.mainGetProxyStatus();
|
final isProxy = await bind.mainGetProxyStatus();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user