3
RESTful API:具有共享或特定URL的HTTP动词?
创建RESTful API时,应该在相同的URL上使用HTTP动词(如果可能),还是在每个操作中创建特定的URL? 例如: GET /items # Read all items GET /items/:id # Read one item POST /items # Create a new item PUT /items/:id # Update one item DELETE /items/:id # Delete one item 或使用特定的网址,例如: GET /items # Read all items GET /item/:id # Read one item POST /items/new # …