title: How do I set a different number of port using Square's okHttp?
body: <p>I'm trying to connect <a href="https://github.com/square/okhttp" rel="noreferrer">okHttp</a> with a web service but with different port, for example, 10000. My idea to stub the responses with a proxy during the unit tests. Neverthless, there is not enough documentation to make it with this library. As a matter of fact, my implementation is:</p>
  
  <pre><code>OkHttpClient client = new OkHttpClient();
  client.setConnectTimeout(TIMEOUT_MS, TimeUnit.MILLISECONDS);
  </code></pre>
  
  <p>For example, with other libraries such as <a href="http://loopj.com/android-async-http/" rel="noreferrer">loopj</a>, this feature is possible:</p>
  
  <pre><code>httpClient.setProxy("localhost", 10000);
  </code></pre>
  
  <p>I'm using this version: <code>com.squareup.okhttp:okhttp:2.5.0</code></p>