The Link-Template HTTP Header Field
Extracted elements (12)
The 'var-base' Parameter exists to allow template variables to be globally identified via URIs, enabling dereferencing to discover the syntax or semantics of a variable. The specification intentionally leaves the format of such information out of scope.
Some target attribute names will not serialize as Structured Field Parameter keys (per Section 3.1.2 of RFC 9651), which implementations must account for when encoding link target attributes.
The Link-Template header field is complementary to, not a replacement for, the Link header field defined in RFC 8288. The Link header field carries links directly while Link-Template carries URI Templates for constructing links.
Implementations MUST support all levels of URI Template defined by RFC 6570 in the link String and the 'anchor' Parameter.
Target attribute Parameter values MUST be Strings, unless they contain non-ASCII characters, in which case they MUST be Display Strings.
The 'anchor' and 'rel' Parameters on the Link-Template header field MUST be Strings, consistent with their usage in the Link header field.
The 'anchor' Parameter MAY contain a URI Template, allowing the link context itself to be templated (e.g., anchor="#{book_id}").
The Link-Template header field is a Structured Field whose value is a List of Strings, where each String contains a URI Template and can have Parameters carrying metadata. It is semantically equivalent to the Link header field except that the link target and link anchor can contain URI Templates.
The 'var-base' Parameter on a templated link conveys a URI-reference used as a base URI for variable names in the URI Template, allowing template variables to be globally identified rather than context-specific.
To determine the URI for a given variable under 'var-base', the value is used as a base URI in reference resolution (per RFC 3986). If the resulting URI is still relative, the link context is used as a further base URI per the Web Linking specification.
This specification registers 'Link-Template' as a Permanent field name in the IANA Hypertext Transfer Protocol (HTTP) Field Name Registry.
The security considerations for the Link header field (RFC 8288) and for URI Templates (RFC 6570) both apply to Link-Template. Target attributes conveyed via Display Strings are vulnerable to a wide variety of attacks; implementers should consult Unicode Technical Report #36 for handling guidance.