title: Error in http connection!!android.os.NetworkOnMainThreadException
body: <p>Basically, the only error I am getting when I try to request a http connection is, </p>
  
  <pre><code>Error in http connection !! android.os.NetworkOnMainThreadException
  </code></pre>
  
  <p>I am trying to connect to database in my Wamp server using an android emulator and this is part of the code I used,</p>
  
  <pre><code>   response = CustomHttpClient.executeHttpPost(
     "http://152.226.152.96:89/MPSIP/jsontestscript.php",
     postParameters);
  </code></pre>
  
  <p>I also tried using localhost instead of my IP but I will get the exact same error.</p>
  
  <p>I would like to know how I may establish a http connection with my wampserver. Am I missing out on a step or am I going about it all wrong.</p>
  
  <p>If it helps, I used the guide from,</p>
  
  <p><a href="http://moinur-rahman.blogspot.sg/2012/02/connection-between-android-app-and.html" rel="nofollow">Link to example used here</a></p>