The methods of RestTemplate such as postForEntity() throw RestClientException. I would like to extract the HTTP status code and respon
RestTemplate
postForEntity()
RestClientException
Catch RestClientResponseException instead. It's more generic.
RestClientResponseException
From the docs: Common base class for exceptions that contain actual HTTP response data.