Ideally I just want a list of strings, or Hashmap String,String :
List<String> = restTemplate.getForObject(url, List.class, urlVariables);
However I receive the error Could not extract response: no suitable HttpMessageConverter found for response type.
I can access the restful api using restclient and retreive the following :
Content-Type text/javascript; charset=iso-8859-1
the repsonse body is :
[{"name":"lemons"},{"name":"pears"},{"name":"apples"}]
and my restTemplate is defined as follows :
<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
<property name="messageConverters">
<list>
<bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/>
</list>
</property>
</bean>
I think you might want to take a look at this:
https://spring.io/guides/gs/consuming-rest/
That page says:
Which is pretty much what you are getting. I know the original question was back in 2012, but, hopefully, someone else will see this as a possible solution.
I don't have suitable project for test it, but try: