Skip to content

findProxy and findProxyFromEnvironment should be async #44971

Open
@yamsergey

Description

Dart provides us with possibility to add proxy for HTTP/HTTPS requests.

To do that, developers advised to implement one of the methods:

void set findProxy(String f(Uri url)?);

static String findProxyFromEnvironment(Uri url,

Also in documentation:
https://api.dart.dev/stable/2.10.5/dart-io/HttpClient/findProxy.html
https://api.flutter.dev/flutter/dart-io/HttpClient/findProxyFromEnvironment.html

Unfortunately all the options are synchronous. And at the same time proxy configuration could be way more complex than just host and port stored in environment variables. There could be excluded urls or Auto Proxy configuration, which will require async calls.

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-iotype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions