Reputation: 49077
I want to use the ResponseEntity without returning a body, only set status code and headers. The ResponseEntity is a generic class, do I need to specify the type in this case, and if, what should it be?
Upvotes: 2
Views: 3624
Reputation: 47290
No you don't, just do something like this
ResponseEntity responseEntity = new ResponseEntity(HttpStatus.BAD_REQUEST);
Upvotes: 5