HTTP Method | Data operate | Description |
---|---|---|
POST | Create | Create a resource without id. |
GET | Read | Get a resource. |
PUT | Update | Update a resource or create a resource with id if not existed. |
DELETE | Delete | Delete a resource |
JSON or XML or Text
4. response status code、error code 直接參考 http status code
5. REST 中的資源 一般是名詞 (podcasts, customers, user, accounts 等) 而不是動詞 (getPodcast, deleteUser 等)
沒有留言:
張貼留言