hoodoo
hoodoo copied to clipboard
Review HTTP(S) proxy situation for Client
Older code using an HTTP(S) proxy has to do stuff like this to instantiate a Hoodoo::Client:
options = {
:base_uri => SomeName::Application.config.x.platform_api_endpoint,
# ...other things...
}
unless Rails.env.test?
options[ :discoverer ] = Hoodoo::Services::Discovery::ByConvention.new( {
:base_uri => SomeName::Application.config.x.platform_api_endpoint,
:proxy_uri => ENV[ 'https_proxy' ]
} )
end
return Hoodoo::Client.new( options )
Can that be automated? Doesn't Net::HTTP self-configure?