The client using a GET request to find an id to use for a PUT would
have all the problems of non-atomic operations (since it can't
possibly be atomic). What if two clients both call GET at the same
time to get the *next* id to insert? What if N clients call GET to get
the next id to insert but never do the PUT? PUT to a specific id is
really only truly useful when the id is deterministic.


On Tue, Dec 22, 2009 at 8:33 PM, Niclas Hedhman <[email protected]> wrote:
> On Wed, Dec 23, 2009 at 12:12 AM, Fabio Mancinelli
> <[email protected]> wrote:
>
>> Examples:
>>
>> PUT : http://docs.amazonwebservices.com/AmazonS3/2006-03-01/API/
>> POST : posting a comment in some kind of restful forum : POST
>> http://foo/post/1/comments will create a comment whose URI is
>> something like http://foo/post/1/comments/12345 (the client cannot
>> know what the ID of the comment will be, so it does a POST on the
>> parent resource)
>
> But the client *could* GET request a URI for a new resource from the
> container, in this case the blogpost, and then execute a PUT.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2432842

Reply via email to