3 ms·
One minor nuance I use is adding a trailing slash to indicate resource vs custom verb. GET /products/ : will return the list of all products POST /products/ :
by Johnie 12y ago
One minor nuance I use is adding a trailing slash to indicate resource vs custom verb.
GET /products/ : will return the list of all products
POST /products/ : will add a product to the collection
GET /products/4/ : will retreive product #4
PATCH/PUT /products/4/ : will update product #4
POST /products/4/someCustomVerb : custom verb