I'm new to spring and working with some existing REST client code. The code successfully calls an outside REST web service by passing it a json request string and receiving a json response string
and I catch RestClientException that might result from this call.
String resp = client.postForObject( serviceUrl, jsonRequestString, String.class );
What happens to the HTTP response and other header information? Is there a different call through which I can get the entire HTTP response? Something like this pseudocode:
HttpRequest httpReq = new HttpRequest(jsonRequestString);
HttpResponse httpResp = client.makeHttpCall(serviceUrl, httpReq);
HttpResponseCode = httpResp.getCode();
String resp = httpResp.getBody();