[rest-practices] dumping link headers

Bill Burke bburke at redhat.com
Tue Jun 29 21:06:27 UTC 2010


Awhile back I blogged about dumping Link headers in favor of just 
putting a URL within a custom header:

http://bill.burkecentral.com/2009/10/14/link-headers-vs-custom-headers/

I think I'm going to go ahead with link headers for the RESTful 
interfaces I'm doing.  The thing is, no client framework that I know of 
supports link headers and a small, but untrivial, piece of code would 
have to be written to support link header parsing for each language that 
would consume my RESTful interfaces.

So, what I'm going to do is use custom headers instead and make Link 
header usage optional and see who wins.  The custom headers would look like:

<Name>: http://.../my/link
<Name>-Type: application/xml

i.e.

Transaction: http://.../tm/tx/1234
Transaction-Type: application/tx+xml

Consume-Next: http://../next/message

Thoughts on ditching link headers in favor of custom HTTP headers?

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com




More information about the rest-practices mailing list