users@jsr311.java.net

Re: Supporting Link: header?

From: Michael Hausenblas <michael.hausenblas_at_deri.org>
Date: Sun, 09 Aug 2009 07:23:10 +0100

Marc,

Seems I've not received the reply (stumbled upon your answer just now via
the archive).

So, thanks a lot for your answer. Will do as you advice, for now, and still
hope that, once LRDD is an RFC, you consider to reflect this in the API.

On Aug 4, 2009, at 2:02 AM, Michael Hausenblas wrote:
>
> When reading the Appendix B of v1.1 of the Editors Draft of JAX-RS,
> I was
> wondering if there is *any* chance that the Link: header will be
> supported
> as well (pls. forgive me if this has been discussed already - failed
> to find
> it in the ML archive). Point is that we are implementing a LRDD-based
> service [1] and would be willing to switch to JAX-RS, given this
> header is
> supported.
>
> Let me ensure you that I'm very happy to see your great work re a
> Java/REST
> interface happening; eventually a real alternative to RoR, etc.
>
While there isn't currently a specific method in ResponseBuilder for
the Link header, its still easy to support using:

ResponseBuilder.header("Link", headerValue)

where headerValue is an instance of any class whose toString method
produces a suitable string value for the header.

Its probably a little early in the life of the Link header (its still
an IETF working draft) to bake anything specific for it into the API:
if the draft changes significantly then backwards compatibility
requirements on the API could make it awkward to evolve the API.

Regards,
Marc.

-- 
Dr. Michael Hausenblas
LiDRC - Linked Data Research Centre
DERI - Digital Enterprise Research Institute
NUIG - National University of Ireland, Galway
Ireland, Europe
Tel. +353 91 495730
http://linkeddata.deri.ie/
http://sw-app.org/about.html