On Jul 2, 2012, at 11:59 PM, Julian Reschke wrote:
> On 2012-07-02 23:52, Bill Burke wrote:
>>
>>
>> On 7/2/12 5:47 PM, Julian Reschke wrote:
>>> On 2012-07-02 23:37, Bill Burke wrote:
>>>> One thing I noticed about JAX-RS 2.0 Link class is that it can't support
>>>> templates. I know the original link header draft had a Link-Template
>>>> header, but I couldn't find any information beyond the original draft.
>>>> Anybody know what the deal is with templates?
>>>
>>> Template support was not included. According to the change history (see
>>> <http://greenbytes.de/tech/webdav/draft-nottingham-http-link-header-10.html#rfc.section.E>)
>>>
>>> it was removed early; probably because URI templates were not ready; and
>>> it introduced complexity that wasn't really needed.
>>>
>>
>> This is an issue for Resteasy as our old link header support allowed
>> templates. I know a lot of our users use the templating feature of our
>> Link header parser/object representation.
>>
>> Bill
>
> In "Link:"???
>
> <http://greenbytes.de/tech/webdav/draft-nottingham-http-link-header-00.html#rfc.section.5> used to define a distinct header for link templates...
Which is necessary if one wants to support Link templates.
The link header is defined to use URI-References (from RFC 3986) for the URI references. These cannot contain { and } in unescaped form.
Since they cannot occur unescaped, there is no way to distinguish a URI from a 'URI meant as a template' without additional context (which would be the Link-Template header).
AFAIK it is also not possible to use Link templates in any other existing 'link' hypermedia control because they all use 'URI-Reference'.
Jan
>
> Best regards, Julian
>
>