title: java.lang.IllegalStateException Target host must not be null connecting to database
body: <p>I am trying to connect to <code>localhost/myfile.php</code> on my computer. The PHP file converts database data into <code>JSON</code> which I want to parse after connecting. When I try to connect, I get </p>
  
  <pre><code>Target host must not be null, or set in parameters. scheme=null, host=null,   
  path=10.0.0.9/myfile.php
  </code></pre>
  
  <p>Any ideas?</p>
  
  <pre><code>public void getData(){
      String result = "";
      InputStream isr = null;
      try{
          HttpClient httpclient = new DefaultHttpClient();
          HttpPost httppost = new HttpPost("10.0.0.9/myfile.php");  
          HttpResponse response = httpclient.execute(httppost);
          HttpEntity entity = response.getEntity();
          isr = entity.getContent();
  }
  catch(Exception e){
          Log.e("log_tag", "Error in http connection "+e.toString());
          resultView.setText("Couldnt connect to database" + e);
  </code></pre>