I am trying to capture an HTTP request response made by my java client code. The response is of the application/pdf content type. In the logs, I see that the server sent a response to
Object result = getRestTemplate().postForObject(urlString, formDataHttpEntity, returnClassObject, parametersMapStringString);
and I get the following JUnit error:
org.springframework.web.client.RestClientException: could not retrieve response: no suitable HttpMessageConverter was found for response type [java.lang.Object] and content type [application / pdf]
What do I need to do to get past this? My ultimate goal is to accept this in byte[] and push it into the blob database table field type
Note. I get the following response header from the server
HTTP / 1.1 200 OK Cache-Control: max-age = 0, must-revalidate
Content-Disposition: attachment; filename = "Executive Summary.PDF"
Content-Type: application / pdf
source share