Skip to content

Commit

Permalink
use io HttpClient findProxy method instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ramin-deriv committed Feb 19, 2024
1 parent 8d50c3c commit 7f6e698
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/deriv_http_client/lib/src/http_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ class ProxyAwareHttpClient implements BaseHttpClient {
final Completer<void> _setupCompleter = Completer<void>();

Future<void> _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;

Expand Down

0 comments on commit 7f6e698

Please sign in to comment.