From 7f6e6986cd6b4f3343bd6b9b275e79a55f87c517 Mon Sep 17 00:00:00 2001 From: ramin-deriv Date: Mon, 19 Feb 2024 18:54:01 +0800 Subject: [PATCH] use io HttpClient findProxy method instead --- packages/deriv_http_client/lib/src/http_client.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/deriv_http_client/lib/src/http_client.dart b/packages/deriv_http_client/lib/src/http_client.dart index aec69290d..e4d03a571 100644 --- a/packages/deriv_http_client/lib/src/http_client.dart +++ b/packages/deriv_http_client/lib/src/http_client.dart @@ -74,7 +74,9 @@ class ProxyAwareHttpClient implements BaseHttpClient { final Completer _setupCompleter = Completer(); Future _setupProxy(String url) async { - final String proxy = await FlutterSystemProxy.findProxyFromEnvironment(url); + // final String proxy = await FlutterSystemProxy.findProxyFromEnvironment(url); + final String proxy = io.HttpClient.findProxyFromEnvironment(Uri.parse(url)); + final io.HttpClient httpClient = io.HttpClient(); httpClient.findProxy = (uri) => proxy;