How can a response status code be set for No Content (204)?

Refer to the exhibit.

How can a response status code be set for No Content (204)? (Choose the best answer.)
A . Annotate the update() handler method with @PutMapping(“/store/orders/{id”}”, HttpStatus.NO_CONTENT).
B . Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
C . Annotate the update() handler method with @ResponseEntity(204).
D . The update() handler method cannot return a void type, it must return a ResponseEntity type.

Answer: C

Explanation:

Reference: https://stackoverflow.com/questions/55691288/is-this-the-correct-way-to-return-204-no-content- using-spring

Latest 2V0-72.22 Dumps Valid Version with 60 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments