I am trying to use Spring for Android to make a standard HTTP POST for a URL where the body is just a list of parameters (such as key-value pairs) and not a JSON object.
I would like the response to be converted from JSON to Java ResponseObject, but from what I can say, Spring will also convert my body to JSON.
Here is my code:
Map<String, Object> params = new HashMap<String, Object>(); params.put("client_id", mClientId); params.put("state", mState); params.put("username", mUsername); params.put("password", mPassword); return getRestTemplate().postForObject(url, params, ResponseObject.class);
Thank you in advance!
source share