codegram/hyperclient

Faraday is not using ENV variables for proxy

Closed this issue ยท 4 comments

espen commented

๐Ÿž Bug Report

Steps to reproduce

Set ENV['http_proxy'] to local proxy.

Do request using Faraday directly will use env proxy.

Do request using Hyperclient will not use env proxy.

Current Behavior

Overrides Faraday defaults.

Expected behavior

Let Faraday use ENV defaults

Additional context/Screenshots

Must set client.faraday_options = { proxy: 'http://localhost:8080' } manually to get proxy working.

espen commented

This was not an issue with hyperclient (0.9.3) and faraday (1.1.0). Upgraded to hyperclient (1.0.1) and faraday (1.6.0).

Is this a known change in Faraday behavior or something we did? Either way I think the right thing to do would be to document this in https://github.com/codegram/hyperclient/blob/master/UPGRADING.md. WDYT?

espen commented

I started doing some more research on this and it seems to be an issue with Faraday. Will debug some more and update this thread later. Closing for now. Sorry for the confusion, thanks for the reply.

I started doing some more research on this and it seems to be an issue with Faraday. Will debug some more and update this thread later. Closing for now. Sorry for the confusion, thanks for the reply.

I think either way you want to document this to help the next person.