@DeleteMapping

Learn how to delete a record from the database using DELETE request.

We'll cover the following

The HTTP DELETE request deletes a record. The primary key of the record to be deleted can be sent as part of the request URI or the record itself can be sent as part of the request body. The client will send a DELETE request to our REST service with the id of the player to be deleted. The REST Service deletes the record and responds with the 200 (OK) status code to the client.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.