Nobody Understands REST or HTTP
21–30 of 141 posts
Re: Nobody Understands REST or HTTP
#22I don't think that I can fully agree with the idea that a news article written in English is not different content from the German version.
Re: Nobody Understands REST or HTTP
#23I don't think that I can fully agree with the idea that a news article written in English is not different content from the German version.
Generally works better for more real entities like for example specific products, than for articles.
Re: Nobody Understands REST or HTTP
#24Is there any way to make the browser do an Accept: application/csv header on a hyperlink? I'm pretty sure users like their "Download as CSV" links, which I've generally done as /normal/resource/url(.csv) While this post sets out the ideals, I think there are some cases where for usability, you have to do something less than ideal.
Re: Nobody Understands REST or HTTP
#25Is there any way to make the browser do an Accept: application/csv header on a hyperlink? I'm pretty sure users like their "Download as CSV" links, which I've generally done as /normal/resource/url(.csv) While this post sets out the ideals, I think there are some cases where for usability, you have to do something less than ideal.
Accept header is all but useless these days. Servers rarely look at the Accept header that is sent with the request, and browsers can rarely know ahead of time what type of content to expect when merely clicking on a URL. Check out this blog post by Eric Law on IE and the Accept Header ( http://blogs.msdn.com/b/ieinternals/archive/2009/07/01/ie-an... )
Re: Nobody Understands REST or HTTP
#26Remember that one of the advantages of URLs is the ability to easily share them, however I'm not sure I'd be comfortable sharing content that could show up translated to some recipients, based on the language of their browser/application/computer. For example, most CMS systems assume that the content can be completely different between languages (for the same article): you can have the full text in English and only a teaser in other languages.
Maybe not a pure REST approach but using '/en','/pt','/fr' in the URL has proven to be much easier and safer, from my experience.
Re: Nobody Understands REST or HTTP
#27Re: Nobody Understands REST or HTTP
#28Is there any way to make the browser do an Accept: application/csv header on a hyperlink? I'm pretty sure users like their "Download as CSV" links, which I've generally done as /normal/resource/url(.csv) While this post sets out the ideals, I think there are some cases where for usability, you have to do something less than ideal.
They're ivory tower ideals. The web has grown organically and it has the warts to prove it. It's useful to think about the spec and to work toward improvements, but if it's real world possible to have your services work well for mobile clients on m.domain.com and real world impractical to do so on your main domain (or any of the other examples regarding actions, languages, versioning, whatever)—then by all means, bre…
Re: Nobody Understands REST or HTTP
#29While I generally agree with the principles underlined in the article, using the Accept-Language header is definitely not the right way to control internationalization. Remember that one of the advantages of URLs is the ability to easily share them, however I'm not sure I'd be comfortable sharing content that could show up translated to some recipients, based on the language of their browser/application/computer. For…
Re: Nobody Understands REST or HTTP
#30I had a really interesting conversation about this with a coworker a few weeks ago. We were talking about URL design. I argued for URLs like this: /networks/ /networks/girl_talk/ /networks/girl_talk/tracks/ /search?term=bass&sort=artist He argued for URLs like this (note the pluralization): /networks/ /network/girl_talk/ /network/girl_talk/tracks/ /search/bass/sort/artist/ My case boiled down to, “A URL represents th…
/search/bass/sort/artist/
That doesn't look like a hierarchical resource. You probably don't list sort options under /search/bass/sort/, and even then /search/bass/sort/artist/ wouldn't be logical subset of that.This URL looks more like a different view on /search/bass resource, so /search/bass?sort=artist is IMHO more appropriate.