On Thu, Sep 1, 2011 at 1:12 AM, Jens Alfke <[email protected]> wrote: > > On Aug 31, 2011, at 4:00 PM, Gert Cuykens wrote: > >> The first example, will result into a document conflict because rev is >> not specified in the doc and the rev from the the url gets ignored. >> All other examples work > > I think what you’re pointing out is that when PUTting a document you have to > specify the current revision as a _rev key in the JSON; whereas many related > requests (like DELETE, COPY and PUT of an attachment) specify the revision in > a “?rev=“ URL query parameter instead. > > I _think_ the reason for this is that PUT came first and has the simplicity > of requiring that you send back a modified copy of the exact document you got > from the GET. When the other requests were added they didn’t have any obvious > JSON body to hold the _rev, so they added it to the URL instead. > > It seems reasonable to suggest that PUT be allowed to specify the revision ID > in the URL as an option. It might simplify some client’s code if it were > consistent with the other requests that modify documents. > > —Jens
Yes, exactly it will tremendously improve and shorten my client code. Can you implement this in the development branch pleas.
