--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group, send email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft?hl=en.
I would call it absolute vs relative. I think fragments are more like #anchor which is a different concept but probably an interesting conversation.
I agree that both absolute and relative are "correct". I tend to recommend clients I control to support both, but my services I recommend returning absolute.
I do encourage the use of relative URL spec for handling relative URLs. I think this would usually make Mike suggestion not work unless you define some other rule to determine the base than the document you received the URL from(which I think is OK as long as it is in your apis docs).
I have found both approaches have their own problem. Absolute URLs require extensive URL rewriting to make sure your api is returning links to the appropriate environment, and depending on your system this could get complicated. Relative however requires additional Client processing which isn't always trivial if you follow the spec and may hurt adoption.
I have worked with one api that supplied relative links for its resources and absolute when linking to an external system. This has the downside of only allowing one external environment to be used with this service. That of course is a problem with absolute in general but is exaggerated when linking between systems.
Relative URL spec: http://www.ietf.org/rfc/rfc1808.txt
- Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/groups/opt_out.