Which HTTP method is used to delete a resource in REST?
A) DELETE
B) GET
C) POST
D) PUT
Answer:
A) DELETE
Explanation:
The DELETE method in REST is used to delete a resource on the server. When a client sends a DELETE request, it specifies the resource to be removed by its URL. The server then deletes the resource and may return a response indicating the result of the operation.
DELETE requests are idempotent, meaning that sending the same DELETE request multiple times will have the same effect as sending it once—once the resource is deleted, further DELETE requests will not change the server state.