Use HTTP proxy with Savon
<p>I need to access a service with an IP whitelist from Heroku, necessitating the need for an HTTP proxy.</p>

<p>I configured the Proximo add on, and have a proxy url that looks approximately like <code>http://proxy:secret-key@proxy-0-0-0-0.proximo.io</code></p>

<p>In Savon, I have tried configuring a proxy like so:</p>

<pre><code>client = Savon.client(wsdl: my_wsdl, proxy: "http://proxy:secret-key@proxy-0-0-0-0.proximo.io")
</code></pre>

<p>But when I make a request:</p>

<p><code>client.operations</code></p>

<p>I get a proxy error:</p>

<pre><code>Wasabi::Resolver::HTTPError: Error: 407 for url http://mywsdl
        from /Users/ahamon/.gem/ruby/2.3.0/gems/wasabi3.5.0/lib/wasabi/resolver.rb:45:in `load_from_remote'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/wasabi3.5.0/lib/wasabi/resolver.rb:33:in `resolve'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/wasabi3.5.0/lib/wasabi/document.rb:142:in `xml'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/wasabi-3.5.0/lib/wasabi/document.rb:160:in `parse'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/wasabi-3.5.0/lib/wasabi/document.rb:147:in `parser'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/wasabi-3.5.0/lib/wasabi/document.rb:64:in `soap_actions'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/savon-2.11.1/lib/savon/client.rb:28:in `operations'
        from (irb):7
        from /Users/ahamon/.gem/ruby/2.3.0/gems/railties-4.2.4/lib/rails/commands/console.rb:110:in `start'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/railties-4.2.4/lib/rails/commands/console.rb:9:in `start'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:68:in `console'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from /Users/ahamon/.gem/ruby/2.3.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `&lt;top (required)&gt;'
        from bin/rails:4:in `require'
        from bin/rails:4:in `&lt;main&gt;'
</code></pre>

<p>Everything works just fine without the proxy option, though.</p>