title: use dispatch 0.9.5 behind proxy?
body: <p>I'm trying to execute (in IntelliJ IDE or from sbt command-line) this very basic dispatch snippet from behind a proxy :</p>
  
  <pre class="lang-scala prettyprint-override"><code>import dispatch._
  val svc = url("http://api.hostip.info/country.php")
  val country = Http(svc &gt; as.String)
  println(country())
  </code></pre>
  
  <p>and all I can get is an exception :</p>
  
  <pre><code>java.net.ConnectException: Connection timed out: no further information to
      http://api.hostip.info/country.php java.util.concurrent.ExecutionException:
         java.net.ConnectException: Connection timed out: no further information 
              to http://api.hostip.info/country.php
  </code></pre>
  
  <p>I tried with no conclusive result to set the usual vm parameters : 
  <code>-Dhttp.proxyHost=</code>_my_proxy_host_  <code>-Dhttp.proxyPort=80</code>
  and still got the same exception.</p>
  
  <p>On the other hand, the following snippet does work well :</p>
  
  <pre class="lang-scala prettyprint-override"><code>import dispatch._
  val svc = url("http://api.hostip.info/country.php") setProxyServer(new com.ning.http.client.ProxyServer(myproxyhost,80))
  val country = Http(svc &gt; as.String)
  println(country())
  </code></pre>
  
  <p>Since it does not seem quite aesthetic nor scala-ish, I wonder if it is really what I am supposed to do in such a case.</p>
  
  <p>Any help would be welcome, thanks in advance. </p>