Re: Returning data after PUT/POST

2009-01-23 Thread Jean-Philippe Steinmetz
Thanks again for everyone's input. I re-read through some of the REST docs and realized my misunderstanding of the PUT/POST methods. For simplicity I think the idea of mapping the URI pattern /cars/{id} to the singular resource implementation and /cars to the plural will be sufficient; with PUT su

Re: Returning data after PUT/POST

2009-01-21 Thread Rhett Sutphin
> If you are both suggesting using POST to add an entry why use PUT > then? It seems to make PUT somewhat irrelevant unless performing an > update. PUT is useful for updates. It's also useful when the client determines the resource's URL. This latter case is pretty common -- some systems

Re: Returning data after PUT/POST

2009-01-21 Thread John D. Mitchell
On Wednesday 2009.01.21, at 10:56 , Jean-Philippe Steinmetz wrote: [...] > If you are both suggesting using POST to add an entry why use PUT > then? It seems to make PUT somewhat irrelevant unless performing an > update. This is a coming misunderstanding in coming to REST. For more informat

Re: Returning data after PUT/POST

2009-01-21 Thread Jean-Philippe Steinmetz
Thanks for all the help. If you are both suggesting using POST to add an entry why use PUT then? It seems to make PUT somewhat irrelevant unless performing an update. I'm going to have to do some rethinking. I'm mainly using this rest service for passing serialized objects back and forth between

Re: Returning data after PUT/POST

2009-01-20 Thread Donald S Strong
Hi Jean-Philippe, > If I want to add a resource named car I perform a PUT on a url like http://localhost/myapp/car/ instead of http://localhost/myapp/car/15. I agree with Rhett, use POST and then GET. POST http://localhost/myapp/car creates the car object with a new ID and redirects to the URI

Re: Returning data after PUT/POST

2009-01-20 Thread Rhett Sutphin
Hi Jean-Philippe, > Based on the way i've currently constructed my app this may not be > possible. If I want to add a resource named car I perform a PUT on a > url like http://localhost/myapp/car/ instead of http://localhost/myapp/car/15 > . This is because I do not want the client to be resp

Re: Returning data after PUT/POST

2009-01-20 Thread Jean-Philippe Steinmetz
Based on the way i've currently constructed my app this may not be possible. If I want to add a resource named car I perform a PUT on a url like http://localhost/myapp/car/ instead of http://localhost/myapp/car/15. This is because I do not want the client to be responsible for managing identifiers

RE: Returning data after PUT/POST

2009-01-16 Thread Jerome Louvel
http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Karel Vervaeke [mailto:ka...@outerthought.org] Envoyé : vendredi 16 janvier 2009 09:25 À : discuss@restlet.tigris.org Objet : Re: Returning data after PUT/POST I'm not su

Re: Returning data after PUT/POST

2009-01-16 Thread Karel Vervaeke
I'm not sure if this will help you, but in case of a PUT, you already know the url, issuing a GET to the same url should (by your implementation) return the same entity body you presented in the PUT. If you want to retrieve a 'more informative' representation (i.e. including the 'internal' id), yo