draft-nottingham-http-link-header-05: a question and an experimental implementation

I have a question on draft-nottingham-http-link-header-05: is there an
agreed mechanism for clients to indicate whether they want link
headers, the equivalent html/xml elements, or neither?  It seems
wasteful to generate redundant or unneeded data, especially while
client support for the headers is not widespread.   Apologies if this
has been covered previously (I did review the April-June archive).

Meanwhile, you may be interested in an experimental implementation of
link headers (&/or elements) for Ruby on Rails, generating them from
metadata constructed from the application's routing config.  Please
drop me a line if you'd like to play with it.  There is a Python
library too but it lacks the server framework integration.

I went with the hash URI approach [1] to identifying extension
relation types, with the fragment pointing inside the metadata
obtainable (in multiple formats) via the "describedby" links.  See for
example the last two links below:

    Link: <http://example.com/users/dojo>; rel="self"; type="user",
          <http://example.com/described_routes/user>;
rel="describedby"; type="ResourceTemplate",
          <http://example.com/described_routes/user?user_id=dojo>;
rel="describedby"; type="ResourceTemplate",
          <http://example.com/users>; rel="up"; type="users",
          <http://example.com/users/dojo/edit>; rel="edit";
rel="http://example.com/described_routes/user#edit"; type="edit_user",
          <http://example.com/users/dojo/articles>;
rel="http://example.com/described_routes/user#articles";
type="user_articles"

If I interpret the spec correctly, there is no strong guidance on the
use of the "type" attribute.  I hope that my usage here seems
reasonable.

    [1] http://www.w3.org/TR/cooluris/#hashuri

Regards,

Mike
mjb@asplake.co.uk
http://positiveincline.com
http://twitter.com/asplake

Received on Friday, 19 June 2009 09:42:18 UTC