What HTTP method should be used to update only the description field of a network device resource via a REST API?
Trap 1: DELETE
DELETE removes the resource entirely.
Trap 2: PUT
PUT replaces the entire resource, not just a single field.
Trap 3: POST
POST is used to create a new resource, not update existing ones.
- A
DELETE
Why wrong: DELETE removes the resource entirely.
- B
PUT
Why wrong: PUT replaces the entire resource, not just a single field.
- C
POST
Why wrong: POST is used to create a new resource, not update existing ones.
- D
PATCH
PATCH is designed for partial updates to a resource.