I'm trying to implement pessimistic concurrency for a web application and I am having some issues on how I should proceed to lock my document. At the moment, I'm being told that to lock a document, it should be a POST action instead of locking the document from a GET action.
I understand that a GET method should be idempotent and only return the document without any side effect. I also read about conditionnal and partial GET but that does not seems to fix my issue since none of the header fields seems usable for pessimistic concurrency.
On the other end, a POST method should send a document that the server should use to replace an existing one or to create it from if that document did not exist on the server. I find it perplexing to obtain my document on a POST action.
I am quite confused about this. I honestly do not know how to proceed. Is locking the document for other readers from a GET request considered a side effect.
Aucun commentaire:
Enregistrer un commentaire