title: Unable to contact host machine (10.0.2.2) from emulator
body: <p>I have a python REST API server running on my laptop. I am trying to write a rest client in Android (using Eclipse ADT etc) to contact it using Apache's client (org.apache.http.client) libraries. </p>
  
  <p>The code is really simple, and basically does the following - </p>
  
  <pre><code>HttpGet httpget = new HttpGet(new URI("http://10.0.2.2:8000/user?username=tim"));
  HttpResponse response = httpclient.execute(httpget);
  </code></pre>
  
  <p>However at execute, it exceptions out with a time out exception. I cannot hit the URL even from the browser in the emulator. </p>
  
  <p>Details of the exception </p>
  
  <pre><code>org.apache.http.conn.ConnectTimeoutException: Connect to /10.0.2.2:8000 timed out
  </code></pre>
  
  <p>However, I tried using the cREST client on Chrome on my laptop, and I am able to query the REST server fine. </p>