android - How update the values using http put method asynctask -


i new android , trying update these values , should httpput method. know , post method please can guide me convert put method. in post method

jsonobject json = new jsonobject();  json.put("id", "15"); json.put("lid", enid); json.put("name",assetname); json.put("des",description1);   httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost(url); jsonobj = json.tostring();  httppost.setentity(new stringentity(jsonobj)); httppost.setheader("accept", "application/json"); httppost.setheader("content-type", "application/json");  httpresponse httpresponse = httpclient.execute(httppost); int statuscode = httpresponse.getstatusline().getstatuscode(); 


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -