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.
i get the response code 200 even i'm passing the wrong parameter in url what's the reason behind this.
here is my code:
DefaultHttpClient UserIDclient = MySSLSocketFactory.getNewHttpClient();
HttpPost httppost = new HttpPost("my url");
List<BasicNameValuePair> nvps = new ArrayList<BasicNameValuePair>();
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);