[rest-practices] dumping link headers

Sergey Beryozkin sberyozk at redhat.com
Wed Jun 30 09:08:55 UTC 2010


Hi

As far as the user's experience is concerned, what would be the difference between dealing with related pairs of custom headers
(or complex Link header) and say some custom XMl/JSON response body representing the same information ?

Using Name & Name-Type convention is simple and easy on the eye, it looks fine, but this approach is probably less likely to work well with generic clients ? Link might do better

cheers, Sergey
 
----- Original Message -----
From: "Bill Burke" <bburke at redhat.com>
To: rest-practices at redhat.com
Sent: Tuesday, June 29, 2010 10:06:27 PM GMT +00:00 GMT Britain, Ireland, Portugal
Subject: [rest-practices] dumping link headers

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

_______________________________________________
rest-practices mailing list
rest-practices at redhat.com
https://www.redhat.com/mailman/listinfo/rest-practices




More information about the rest-practices mailing list