Which HTTP method is typically used to update an existing resource in REST?
A) PUT
B) GET
C) DELETE
D) POST
Answer:
A) PUT
Explanation:
The PUT method is typically used to update an existing resource in REST APIs. When a client sends a PUT request, it usually includes the updated data in the request body, and the server uses this data to modify the existing resource identified by the URL.
PUT is idempotent, meaning that sending the same PUT request multiple times will have the same effect as sending it once. This makes it suitable for updating resources where the result of the update should be consistent across multiple requests.