Cannot get the httpPost params but can get the httpGet from php
<p>Here is my android code to send request:</p>

<pre><code>// defaultHttpClient
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(serverUrl);
List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;();
params.add(new BasicNameValuePair("abc", "abc2"));
httpPost.setEntity(new UrlEncodedFormEntity(params));
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
InputStream is = null;
is = httpEntity.getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
    sb.append(line + "\n");
}
is.close();
String json = "";
json = sb.toString();
Log.d("JSON", "JSON is:" + json);
</code></pre>

<p>and here is my php code to get the request:</p>

<pre><code>&lt;?php

echo $_POST['abc'];

?&gt;
</code></pre>

<p>When I run the application, the string <code>json</code> is nothing. I expect to get <code>JSON is:abc2</code><br>
Then I change the some code, in android part:  </p>

<pre><code>HttpPost httpPost = new HttpPost(serverUrl);  
</code></pre>

<p>change to:  </p>

<pre><code>HttpPost httpPost = new HttpPost(serverUrl + "?abc=abc3");
</code></pre>

<p>in php part:  </p>

<pre><code>&lt;?php

echo $_GET['abc'];

?&gt;
</code></pre>

<p>This time, the string <code>json</code> in logcat is <code>JSON is:abc3</code>. It is correct!!<br>
I have tried lots of time, but seems cannot send HttpPost request with params.<br>
Any one can help me to find out what wrongs with my code??</p>
