您将如何以RESTful方式实现复制粘贴支持?
假设我有书店资源.每家商店都有书籍
http://mydomain.com/rest/book-stores/1 http://mydomain.com/rest/book-stores/1/books/12
我需要客户端能够调用书籍的复制粘贴到另一个商店.
实施以下内容:
PUT http://mydomain.com/rest/books/1/copy-paste
看起来很像RPC.您是否有任何建议如何以RESTful方式对此操作进行建模?
复制=获取http://mydomain.com/book/1
粘贴= PUT http://mydomain.com/book/2 或POST http://mydomain.com/book