Nice article.
I prefer PATCH instead of PUT for updating entities.
PUT is defined as create or update a record and should send the whole record.
PATCH only updates an existing entity and should return an error if this entity does not exist. Also PATCH can partially update, while PUT is expected to send the whole data.
So for regular CRUD - POST, GET, PATCH, DELETE.
If you have something like a daily counter PUT is ideal. Create a day entry if not exist or update the existing one.
Great explain about updating HTTP method Sebastian
Yes, I agree with you. In the article I just mention a few popular methods so that it is not too long for beginners to feel exhausted 😉
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article.
I prefer PATCH instead of PUT for updating entities.
PUT is defined as create or update a record and should send the whole record.
PATCH only updates an existing entity and should return an error if this entity does not exist. Also PATCH can partially update, while PUT is expected to send the whole data.
So for regular CRUD - POST, GET, PATCH, DELETE.
If you have something like a daily counter PUT is ideal. Create a day entry if not exist or update the existing one.
Great explain about updating HTTP method Sebastian
Yes, I agree with you. In the article I just mention a few popular methods so that it is not too long for beginners to feel exhausted 😉