title: Android HTTP post not sending post valules
body: <p>Really having problem with this issue.
  The below code suppose to sent to POST values (username,password) to the server and the server should just response with the var_dump of GET and POST.</p>
  
  <p>PHP CODE:</p>
  
  <pre><code>var_dump($_POST);
  var_dump($_GET);
  </code></pre>
  
  <p>ANDROID CODE:</p>
  
  <pre><code>InputStream is = null;
  
  //http post
  try{
          HttpClient httpClient = new DefaultHttpClient();
          HttpPost httpPost = new HttpPost(url + "?test=test");
          httpPost.setHeader("Content-Type", "application/json");
          httpPost.setHeader("Accept", "application/json");
  
          // place them in an array list
          ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
          nameValuePairs.add(new BasicNameValuePair("username", "1123"));
          nameValuePairs.add(new BasicNameValuePair("password", "123123"));
  
          // add array list to http post
          httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  
          HttpResponse response = httpClient.execute(httpPost);
          HttpEntity entity = response.getEntity();
          is = entity.getContent();
  
          Log.i("Network", "POST URL: " + url);
          Log.i("Network", "POST ARGS: " + jsonObj.toString());
  
      } catch(Exception e){
  
          Log.e("Network", "POST Error in http connection " + e.toString());
  
      }
  </code></pre>
  
  <p>But all i get is:</p>
  
  <pre><code>array(0) {
  }
  array(1) {
     ["test"]=&gt; string(4) "test"
  }
  </code></pre>
  
  <p>I have tested the server with curl: curl -F 'username=test' <a href="http://xx.xx.xx.xx/test.php" rel="nofollow">http://xx.xx.xx.xx/test.php</a>
  And it gives me correct return:</p>
  
  <pre><code>array(1) {
     ["username"]=&gt; string(9) "test"
  }
  array(0) {
  }
  </code></pre>
  
  <p>So what am i doing wrong in the android post ?</p>