title: Android HTTP Connection refused
body: <p>I am trying to access from an Android device over WiFi a local web server which I can access from my laptop either on the browser, or using curl. I can also access the server on the android device browser. </p>
  
  <p>The code I am using to access the server yields a <strong>"connection refused"</strong> exception.</p>
  
  <p>This is the code:</p>
  
  <pre><code>public void getController1() {
    HttpClient httpclient = new DefaultHttpClient();
    HttpGet httpget = new HttpGet("http://192.168.1.169:8000");
    HttpResponse response = null;
    System.out.println(httpget.toString());
    try {
      response= httpclient.execute(httpget);
      txtViewStatus.setText("Controller 1 - OK"+response);
    } catch(Exception e) {
      e.printStackTrace();
      txtViewStatus.setText("Controller 1 - Error"+e);
    }
  }
  </code></pre>