September 2017
Intermediate to advanced
244 pages
6h 44m
English
{id:1, title:"Modified Post", content:"This is an awesome post", link:"posts/1" }
Note, if a blog post with the ID provided (that is 1 in this case) does not exist, it should return the response code 404 that means resource not found.
Also, we have used PATCH instead of PUT for the update since PATCH is used to modify all or some attributes of a record while PUT is used for modifying a whole record just like replacing an old record with a new one. So, if we use PUT and pass only one attribute, the other attributes will become empty. In the case of PATCH, it will only update the attribute that is passed and other attributes remain ...
Read now
Unlock full access