This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Best practices for REST include: | |
| - Put your REST API on it’s own URL (e.g. ‘/api/todos’ or ‘/api/purchases’) | |
| - A POST that creates an item should return the ID of the item it created. | |
| - PUT and DELETE should specify the ID of the item they're intended to affect in the URL (e.g. '/todos/123'). | |
| - If the ID for the item specified in a PUT or DELETE couldn't be found, return a 404. | |
| - If an error occurs in the server, return an error code (e.g. 500). |
NewerOlder