Home > database >  How to get body of ResponseEntity<Object> response
How to get body of ResponseEntity<Object> response

Time:12-01

How can I get all body of response without mapping?

When I try response.getBody().toString() it just show Helper@214c265e but I need response of this api in String to show (jsut example) {"test": { "src": "Images/Sun.png", "name": "sun1", "hOffset": 250, "vOffset": 250, "alignment": "center" }} in string

CodePudding user response:

How about smt like:

ResponseEntity<?> response = apiCall();
response.getBody().toString();

CodePudding user response:

override toString() in response.

  • Related