Re: trailing slash for collection URIs?
Jan Algermissen <[email protected]> Mon, 28 Oct 2013 11:06:08 +0100
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <[email protected]> |
Thomas, On 25.10.2013, at 08:56, Thomas Koch <[email protected]> wrote: > Hi, > > this might be a hard to decide question like spaces vs. tabs: I might have an > addressbook web application that has mainly two sites > > /myapp/contacts (or /myapp/contacts/ ?) > /myapp/contacts/{id} > > Should the /myapp/contacts URI have a trailing slash or not? Personally, I prefer to go without the slash and anyhow, use absolute URIs everywhere for the sake of easier debugging 'by hand'. Whatever you chose, you might consider to redirect from one solution to the other, e.g. from /contacts/ to /contacts to free clients from needing to make the distinction. For example, when posting to /contacts/ Jan > > From an implementation perspective I like the trailing slash so that I can > just use the contact id as a relative URI from the collection resource. But on > the other site a collection might also be a resource? > > Thank you for any recommendation! > > Best regards, Thomas Koch > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/rest-discuss/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/rest-discuss/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://info.yahoo.com/legal/us/yahoo/utos/terms/