How to implement copy paste of a resource in REST?
copy-paste, rest
Solution
Copy = GET http://mydomain.com/book/1
Paste = PUT http://mydomain.com/book/2 or POST http://mydomain.com/book
Problem
How would you implement copy-paste support in a RESTful way? Let's say I have book store resource. And books in every store ``` http://mydomain.com/rest/book-stores/1 http://mydomain.com/rest/book-stores/1/books/12 ``` I need the client to be able to invoke copy paste of a book to another store. Implementing the following: ``` PUT http://mydomain.com/rest/books/1/copy-paste ``` seems very RPC like. Do you have any suggestion how can this operation be modeled in a RESTful way?