title: android not executing http post
body: <p>I am trying to connect to a url locally using emulator in my android project when it gets to the point of making the contact to the url connection the next line does not execute. this is the snippet of the code</p>
  
  <pre><code>protected Void doInBackground(Void...params){
              InputStream is=null;
              String result="";
              try{
                  System.out.println("this is specs6"  );
                  HttpClient httpclient=new DefaultHttpClient();
                  System.out.println("this is specs8"  );
                  HttpPost httppost= new HttpPost("http://10.0.2.2/API/getSpecialization.php");
                  HttpResponse response=httpclient.execute(httppost);
                  HttpEntity entity = response.getEntity();
                  System.out.println("this is specs7"  );
                  // Get our response as a String.
                  is = entity.getContent();
              }catch(IOException e){
                  e.printStackTrace();
              }
  </code></pre>
  
  <p>from the above code specs 8 and spec 6 prints to the console but spec 7 never prints. Please what could be wrong?</p>