What should you do?

You are working on a project that adheres strictly to the Roy Fielding REST concepts. You need to update a single property named "status" of a complicated entity.

What should you do?
A . Fetch the full entity, update the status value locally. DELETE the original entity and POST the new version.
B . Fetch the full entity. Change only the status value and then send the whole object in the request body of the PUT service
C . Create a new service that uses the UPDATE verb that accepts the "status* property and updates the entity UPDATE /api/trucks/42/status HTTP/1.1 {status: 5}
D . Create a new service that uses the PATCH verb designed to update only given fields. PATCH /api/trucks/42 HTTP/1.1 {status: 5}

Answer: A

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments