REST URI convention - Singular or plural name of resource while creating it

前端 未结 22 2206
长情又很酷
长情又很酷 2020-12-02 03:35

I\'m new to REST and I\'ve observed that in some RESTful services they use different resource URI for update/get/delete and Create. Such as

  • Create - using
22条回答
  •  我在风中等你
    2020-12-02 04:14

    How about:

    /resource/ (not /resource)

    /resource/ means it's a folder contains something called "resource", it's a "resouce" folder.

    And also I think the naming convention of database tables is the same, for example, a table called 'user' is a "user table", it contains something called "user".

提交回复
热议问题