When making a ajax call see example below success does gets a 201 status retuned. How do you handle these better i.e. 200, 201 within the succe
success
Instead of
ResponseEntity> responseEntity = new ResponseEntity<>(HttpStatus.CREATED);
I used
ResponseEntity> responseEntity = new ResponseEntity<>(detailVO, HttpStatus.CREATED);
Where detailVO is my object to rutrun in case of success. Then in browser I got response in success function.