Post Json Object on server using HttpPost
<p>I have to send json array to the server from android application. i'm able to send  data through httpget but i want to send it through httppost i saw the examples but my data are not posting.</p>

<p>i get the response code 200 even i'm passing the wrong parameter in url what's the reason behind this.  </p>

<p>here is my code:</p>

<pre><code>DefaultHttpClient UserIDclient = MySSLSocketFactory.getNewHttpClient();
HttpPost httppost = new HttpPost("my url");
List&lt;BasicNameValuePair&gt; nvps = new ArrayList&lt;BasicNameValuePair&gt;();
nvps.add(new BasicNameValuePair("api","apiname"));
nvps.add(new BasicNameValuePair("user_id","179"));
nvps.add(new BasicNameValuePair("child_id","94"));
nvps.add(new BasicNameValuePair("json",json array));
UrlEncodedFormEntity p_entity = new UrlEncodedFormEntity(nvps,HTTP.UTF_8);

httppost.setEntity(p_entity);
HttpResponse response = UserIDclient.execute(httppost);
</code></pre>
