How do I retrieve HTTP status code and response body when an RestClientException is thrown?
Asked 2012-09-23T15:25:50.263
53
The methods of RestTemplate such as postForEntity() throw RestClientException. I would like to extract the HTTP status code and response body from that exception object in the catch block. How can I do that?