My rest server generates a response when I called it using the rest client software. When I call it with the resttemplate code resttemplate , then the server generates a response (print logs), but the resttemplate does nothing (the next line is not executed after the call) and prints an internal error .
This is the method on my server.
@ResponseBody public ResponseEntity<Map<String, Object>> name(){...... ... return new ResponseEntity<Map<String, Object>>(messagebody, HttpStatus.OK); }
So I call it through restTemplate
ResponseEntity<Map> response1 = restTemplate.getForEntity(finalUrl.toString(), Map.class);
java json spring rest resttemplate
Muhammad Imran Tariq
source share