I have the following url and data
Input Data Format:
{"data":{"customer_name":"ass","hotel_id":"6","mobile_no":"999966632"}}
Is it possible? If yes how can I pass this data?
What I tried:
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("customer_name", "ass"));
nameValuePairs.add(new BasicNameValuePair("hotel_id", "6"));
nameValuePairs.add(new BasicNameValuePair("mobile_no", "999966632"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httppost);
But in php side I can access it like only
"{"customer_name":"ass","hotel_id":"6","mobile_no":"999966632"}"