-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
8.1.1.Final
-
None
Currently the PUT and DELETE methods in the server do not return the previous value when executed. There should be a way to execute these methods and return the previous value, so that a getAndPut and getAndRemove behavior could be implemented. This behavior could be achieved by using a custom header, the cache-control header or the accept header. The default behavior would remain the same. The behavior of the POST method would also remain the same as it is already very similar to a putIfAbsent call.
Not sure there are any HTTP standards for this, and I'm also not sure if any other key-value stores implement this.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
http://tools.ietf.org/html/rfc7231#section-4.3