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

前端 未结 22 2207
长情又很酷
长情又很酷 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 03:48

    Using plural for all methods is more practical at least in one aspect: if you're developing and testing a resource API using Postman (or similar tool), you don't need to edit the URI when switching from GET to PUT to POST etc.

提交回复
热议问题