Dec 2nd, 2010, 12:31 AM
Spring Android Resttemplate postforobject
I'm trying to use android spring rest template to do a post request. And i need to return the status code. This is my approach.
RestTemplate restTemplate = new RestTemplate();
MultiValueMap mvm = new LinkedMultiValueMap();
mvm.add("login", "100"); // and some more paramters
String result = restTemplate.postForObject("http://localhost:8080/security_check", mvm, String.class);
But this approach doesn't work for me. It generates an error saying no suitable message converter found. And i need to know can i use the resttemplate to manage my sessions. I need to manage the session from the android client side.
If any one come across android resttemplate post method and session management please help me. Any help would be greatly appreciated.
Thanks in advance.
Tags for this Thread