I am posting information to a web service using RestTemplate.postForObject. Besides the result string I need the information in the response header. Is there any way to ge
HttpEntity> entity = new HttpEntity<>( postObject, headers ); // for request HttpEntity response = template.exchange(url, HttpMethod.POST, entity, String.class); String result= response.getBody(); HttpHeaders headers = response.getHeaders();