Hi @all,
is there a possibilty to add http header informations to a get request?
Thanks for any advice!
Hi @all,
is there a possibilty to add http header informations to a get request?
Thanks for any advice!
Yes, but not easily. As I understand it, RestTemplate won't have access to the HTTP headers until Spring 3.1
In the meantime, I would point you at Christian Tzolov's workaround that is found here: http://tzolov.blogspot.com/2010/03/s...o-request.html
Perry Hoekstra
thanks for the advice. I found out another solution that seems to work:
Code:RestTemplate template = new RestTemplateWrapper(requestFactory); URI url = new URI("URI"); HttpEntity<Object> entity = new HttpEntity<Object>(MultiValueMap headerinfo); ResponseEntity<String> result = template.exchange(url, HttpMethod.GET, entity, String.class);