我正试图解决 REST 中“集合”和“商店”之间的区别。从我到目前为止所读到的,一个集合是: “a server-managed directory of resources”一个商店是: “client-managed resource repository”我找到了这篇文章: 如何“存储”REST 原型不会创建新资源和新 URI?但这并没有真正帮助我澄清差异。我的意思是,我知道一个由服务器控制,另一个由客户端控制……但是有人能给我一个具体的例子来说明商店在现实世界的应用程序中可能是什么吗?我*认为是这样的: GET http://myrestapplication.com/widgets/{widget_id} – retrieves a widget from db POST http://myrestapplication.com/widgets/{widget_id} – creates a new widget from db PUT http://myrestapplication.com/widgets/{widget_id},[list of updated parms & their vals] – update widget PUT http://myrestapplication.com/users/johndoe/mywishlist/{widget_id} – updates john doe’s profile to add a widget that already exists in the database… but links to it as his favorite one or one that he wants to buy这样对吗?如果是这样,最后一个 PUT 是否也可以以某种方式表示为 POST?编辑 1我找到了我正在阅读的书的在线链接……它区分了两者:https://books.google.ca/books?id=4lZcsRwXo6MC&pg=PA16&lpg=PA16&dq=A+store+is+a+client-managed+resource+repository.+A+store+resource+lets+an+API+client :+put+resources+in,+get+them+back+out,+and+decide+when+to+delete+them&source=bl&ots=F4CkbFkweL&sig=H6eKZMPR_jQdeBZkBL1h6hVkK_E&hl=en&sa=X&ei=6HYWAGVY&QAAvJ&ei=6HYWAvJ&E=6HYWQAvJ A%20store%20is%20a%20client-managed%20resource%20repository.%20A%20store%20resource%20lets%20an%20API%20client%3A%20put%20resources%20in%2C%20get%20them%20back%20out %20and%20decide%20when%20to%20delete%20them&f=false