dimanche 24 juillet 2016

How to pass value using httpput method in jackson?

I am using core java and jackson for consuming REST services. Now I need to update using HttpPut method. How to update value using this method My request data is like this.

{
  "comments": "Notes",
  "displaynumber": "AA245",
  "order": 1
}

I am using this type of code:

HttpPut httpput = new HttpPut(targetURI + "comments/1001");
httpput.setConfig(config);
httpput.addHeader("content-Type","application/json");
httpput.addHeader("Accept", "application/json");

After this code how to send that Json data using jackson? And I am also using basic auth on this url.

Aucun commentaire:

Enregistrer un commentaire