200-301 · Question #1238
Under the CRUD model, which two HTTP methods support the UPDATE operation? (Choose two.)
The correct answer is A. PATCH E. PUT. This question asks to identify the two HTTP methods that correspond to the UPDATE operation within the CRUD model.
Question
Under the CRUD model, which two HTTP methods support the UPDATE operation? (Choose two.)
Options
- APATCH
- BDELETE
- CGET
- DPOST
- EPUT
How the community answered
(15 responses)- A87% (13)
- B7% (1)
- D7% (1)
Why each option
This question asks to identify the two HTTP methods that correspond to the UPDATE operation within the CRUD model.
The PATCH HTTP method is used to apply partial modifications to a resource, which is a form of updating. It sends only the changes needed, rather than the entire resource representation.
The DELETE HTTP method is used to remove a specified resource, which corresponds to the 'Delete' operation in CRUD.
The GET HTTP method is used to retrieve a representation of a resource, corresponding to the 'Read' operation in CRUD.
The POST HTTP method is primarily used to create new resources, corresponding to the 'Create' operation in CRUD, though it can sometimes be used for updates if the resource identifier is not known beforehand.
The PUT HTTP method is used to completely replace a resource with a new representation or to create a resource if it doesn't exist, serving as a full update operation.
Concept tested: REST API CRUD operations (HTTP methods)
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
Topics
Community Discussion
No community discussion yet for this question.