on-internet
← Community

How to send Json String using REST to java webservice in Parameter in android?

Stack Overflow ·

Fiends, i sending JSON String with three parameters to java web service method. but on java side method cant print in console. Please guide me what i have to change from below code? String json = ""; HttpParams httpParams = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(httpParams, 10000); HttpConnectionParams.setSoTimeout(httpParams, 10000); HttpClient httpclient = new DefaultHttpClient(); // Prepare a request object HttpPost httpPost = new HttpPost(url); HttpGet httpGet = new HttpGet(url); JSONObject jsonObject = new JSONObject(); try { jsonObject.put("name", "ghanshyam");

Comments

Sign in or sign up to comment and upvote.

No comments yet.