Updating Resources by ID
Learn how to update resources in a NestJS application.
We'll cover the following...
Now that we know how to find books by their unique identifier, imagine the scenario where one of our books needs an update. Perhaps the author released a new edition, or there’s a change in its publication details. In this section, we’ll explore the process of updating the information for a specific book using its unique identifier.
The PUT or PATCH method
To make an update operation for a resource, such as a book, we often face a decision between two HTTP verbs: PUT or PATCH. Let’s provide a brief explanation of these verbs in the context of our use case:
The
PUTmethod replaces a ...
Ask