Hi, Fotios:
Optimistic locking is off by default. Did you set the optimistic locking
property for the REST server to required before making the document PUT request?
http://docs.marklogic.com/guide/rest-dev/documents#id_40113
Hoping that helps,
Erik Hennum
________________________________
From: [email protected]
[[email protected]] on behalf of Fotios Tzellos
[[email protected]]
Sent: Thursday, August 22, 2013 4:00 AM
To: [email protected]
Subject: [MarkLogic Dev General] If-Match usage incorrectly documented?
I am using the REST API with If-Match headers to create documents only if they
don't already exist at the specified URI. The documentation at
http://docs.marklogic.com/REST/PUT/v1/documents states that putting an
'If-Match: 0' header onto the PUT request should give this behaviour, but I am
receiving a 412 Conflict in response. Oddly, leaving this header out entirely
(once setting 'content-versions' to 'required') seems to result in the correct
behaviour.
So, is the documentation incorrect, or is there a big in ML?
----------------------------
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and may contain personal
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
---------------------
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general