December 2019
Intermediate to advanced
510 pages
11h 33m
English
The Put action handles how resources are updated. We should bear in mind that the PUT verb is intended as a total replacement of the specific resource. Therefore, when we call an API using a PUT verb, all the resource fields will be replaced with the body payload. As we will see later in this chapter, for a more precise update for some of the specific fields of our entity, it is better to use the PATCH verb.
Another critical thing to keep in mind when we implement a Put action is that we need to handle Ids that don't exist. APIs usually manage non-existent IDs in Put actions using two different approaches: