In the controller, I use
JsonNoderesponse = restTemplate.getForObject(url, JsonNode.class)
However I got a 'Cannot extract response: no Content-Type found' exception.
After debugging, I found the error comes from HttpMessageConverterExtractor.extractData()
where the respose.getHeaders().getContentType()
is null.
So I want to print out the header to see what is missing. Is there a way I can do that?