I'm trying out Spring 3.0's RestTemplate.
I'm trying to send POST parameters along with my request, but can't figure out how to do that. Judging from the documentation, the FormHttpMessageConverter can:I understand how I can register these http message converters in the RestTemplate, but can't seem to figure out how to add POST parameters when doing the request. Apparently I need a MultiValueMap<String,String>, and it's easy enough to create one. However, where do I use this map?read and write form data from the HTTP request and response. By default, this converter reads and writes the media type application/x-www-form-urlencoded. Form data is read from and written into a MultiValueMap<String, String>.
I've tried the generic 'execute' methods in RestTemplate, and create a RequestCallback, but I can't add the POST parameters there either.
Any ideas?


Reply With Quote
