I'm try to send some information in my android app using I tried this code
try{
JSONObject j = new JSONObject();
j.put("engineer", "me");
httppost.setEntity(new UrlEncodedFormEntity(j));
HttpResponse response = httpclient.execute(httppost);
/*Checking response*/
if(response!=null)
{
responseBody = EntityUtils.toString(response.getEntity());
}
if(responseBody.equals("ok"))
{
//...do something
}
} catch(ClientProtocolException e) {
} catch (IOException e) {
// TODO Auto-generated catch block
} catch(Exception e){
e.printStackTrace();
}
but i think there is some error in
httppost.setEntity(new UrlEncodedFormEntity(j));
can you please help me to solve this problem