benoitc / hackney

simple HTTP client in Erlang
Other
1.34k stars 427 forks source link

Extract proxy basic auth from URL #741

Open Coffei opened 5 months ago

Coffei commented 5 months ago

Since this library can automatically use ENV variables to set proxy, it would be cool if it could also set proxy basic auth, if it's present in the URL. We have a proxy ENV variable defined as HTTPS_PROXY=http://user:password@proxy.example.com:80/. I checked the code and it seems while proxy is configured from both explicit configuration options and ENV, proxy auth is only configured via explicit config options.

benoitc commented 5 months ago

I will add this support in https://github.com/benoitc/hackney/pull/737 . Thanks for the suggestion :)