Re: Another newbie question: when is it appropriate to use GET parameters?
http://www.restlet.org/documentation/books This book provides deeply thought out suggestions for 'normative' practices in building RESTful services, and covers the topic of when to use pure resource identifiers and when to use query parameters. Yeah, I read it a while back and remember one thing clearly: If in doubt - make it a resource. :-)
Re: Another newbie question: when is it appropriate to use GET parameters?
On Sun, Mar 23, 2008 at 7:56 PM, Ian Clarke [EMAIL PROTECTED] wrote: When is it appropriate to use a query string to pass parameters to a REST API call? For example, why is: http://blah/user/1234 better than: http://blah/user?id=1234 ? It depends on what you're doing. One of the biggest reasons to use the pure version is that that is fully cachable. I.e., using GET parameters triggers often non-obvious caches and crawlers -- the simplest being that many of them won't cache URLs with parameters. Have fun, John
Re: Another newbie question: when is it appropriate to use GET parameters?
On Thu, Mar 27, 2008 at 11:33 AM, Aron Roberts [EMAIL PROTECTED] wrote: On Thu, March 27, 2008 11:07, John D. Mitchell wrote: [...] One of the biggest reasons to use the pure version is that that is fully cachable. This is to put in another strong recommendation for the recent book by Leonard Rosenthal and Sam Ruby, RESTful Web Services, which you can purchase via the Books link on the Restlet website: http://www.restlet.org/documentation/books This book provides deeply thought out suggestions for 'normative' practices in building RESTful services, and covers the topic of when to use pure resource identifiers and when to use query parameters. Indeed! Good point. Thanks, John
Another newbie question: when is it appropriate to use GET parameters?
When is it appropriate to use a query string to pass parameters to a REST API call? For example, why is: http://blah/user/1234 better than: http://blah/user?id=1234 ? I'm guessing that if I have a GET request which can return a list of a variable length (such as a search), then a GET parameter should be used to indicate how many results should be provided - is this correct? In the event that it is appropriate to use a GET parameter, what is the best way to extract it from a Request? Thanks, Ian. -- Email: [EMAIL PROTECTED] Cell: +1 512 422 3588 Skype: sanity