DEV Community

Lokesh Choudhary Programmer
Lokesh Choudhary Programmer

Posted on

HTTP Verbs

GET - read
DELETE - delete

POST is always for creating a resource ( does not matter if it was duplicated )
PUT is for checking if resource exists then update, else create new resource
PATCH is always for updating a resource

Better Error Handling

error vs res.ok

Oldest comments (0)