Hi, We use optimistic locking. The document-get request returns the Etag header which we send in the If-Match header of a subsequent document-put request.
We have a use case where a user performs several updates (put requests) in a row. Currently, we have to perform a get request after each update to retrieve the new etag. The request pattern looks like this: GET PUT, immediately followed by GET PUT, immediately followed by GET PUT, immediately followed by GET The additional get requests could be avoid, if the REST API (and the Java API) would return the new etag in the response of the PUT request. Similarly, the etag of a document should be returned with the response of a POST request, where the server-side generates the URI ( https://docs.marklogic.com/8.0/REST/POST/v1/documents@extension=[ext]). Cheers, Andreas -- Andreas Hubmer Senior IT Consultant EBCONT enterprise technologies GmbH
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
