-
Notifications
You must be signed in to change notification settings - Fork 971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy string handling is not uniform #150
Comments
Well, according to you it's a doc bug :) I think this goes with #136. We need to be stricter about validating these multi-level hashes, and more consistent about using them in adapters. Were you getting the same error with 0.7.6? |
I was leaning more towards bug in code because it is supported when calling connection directly :) #works
con = Faraday::Connection.new('http://sushi.com', :proxy => "http://localhost:8080")
con.get '/nigiri/sake.json' This piece of code - https://github.com/technoweenie/faraday/blob/master/lib/faraday/connection.rb#L153 - is probably responsible for that. I haven't tried it on 0.7.6 |
Thanks for reporting. Right now I've removed the faulty example from Readme. I hope you don't actually need a per-request proxy setting. It's much easier to set it per-connection. We're going to improve passing such options around. Follow #136 for updates |
No only per connection. I was writing some throwaway code which dealt with proxies and grabbed the sample code and modified. You should probably add an example which shows proxy being used at connection level. I knew proxy option was possible at connection level only because I searched issues. |
If you use the proxy option as documented, an exception will be raised. For the proxy option to work, you need to pass
:proxy => URI.parse(proxy_string). Is this an error in documentation bug or a bug in code ?
The text was updated successfully, but these errors were encountered: