Retrieving data from the REST Server works well, but if I want to post an object it doesn\'t work:
public static void postJSONObject(int store_type, Favorite
Try setting the content type header:
postMethod.addRequestHeader("Content-Type", "application/json");
Btw, I strongly recommend Jersey. It has a REST client library which makes these kind of things much easier and more readable