Avoid duplicate POSTs with REST

Another solution that's been proposed for this is POST Once Exactly (POE), in which the server generates single-use POST URIs that, when used more than once, will cause the server to return a 405 response.

The downsides are that 1) the POE draft was allowed to expire without any further progress on standardization, and thus 2) implementing it requires changes to clients to make use of the new POE headers, and extra work by servers to implement the POE semantics.

By googling you can find a few APIs that are using it though.

Another idea I had for solving this problem is that of a conditional POST, which I described and asked for feedback on here.

There seems to be no consensus on the best way to prevent duplicate resource creation in cases where the unique URI generation is unable to be PUT on the client and hence POST is needed.


I always use B -- detection of dups due to whatever problem belongs on the server side.