The Link-Template HTTP Header Fieldmnot@mnot.nethttps://www.mnot.net/
General
link relationThis specification defines the Link-Template HTTP header field, providing a means for describing
the structure of a link between two resources, so that new links can be generated.The issues list can be found at https://github.com/mnot/I-D/labels/link-template.The most recent (often, unpublished) draft is at https://mnot.github.io/I-D/link-template/.Recent changes are listed at https://github.com/mnot/I-D/commits/gh-pages/link-template. defines a syntax for templates that, when expanded using a set of variables, results
in a URI .This specification defines a HTTP header field for conveying templates for links in the headers of
a HTTP message. It is complimentary to the Link header field , which carries links
directly.The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
“RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in .This document uses the Augmented BNF defined in to specify valid protocol
elements. Additionally, it uses the modified “parameter” rule from ,
and the “URI-Template” rule from .The Link-Template entity-header field provides a means for serialising one or more links into HTTP
headers. It is semantically equivalent to the Link header field , except
that it uses URI Templates to convey the structure of links.For example:indicates that a resource with the relation type “http://example.org/rel/user” can be found by
interpolating the “username” variable into the template given.The target for the link (as defined by ) is the result of expanding the URI
Template (being converted to an absolute URI after expansion, if
necessary).The context, relation type and target attributes for the link are determined as defined for the
Link header field in .The parameters on a linkt-value have identical semantics to those of a Link header field
. This includes (but is not limited to) the use of the “rel” parameter to convey the
relation type, the “anchor” parameter to modify the context IRI, and so on.Likewise, the requirements for parameters on linkt-values are the same as those for a Link header
field; in particular, the “rel” parameter MUST NOT appear more than once, and if it does, the
linkt-value MUST be ignored by parsers.This specification defines additional semantics for the “var-base” parameter on linkt-values; see
below.When a linkt-value has a ‘var-base’ parameter, its value conveys a URI-reference that is used as a
base URI for the variable names in the URI template.This mechanism allows template variables to be globally identified, rather than specific to the
context of use. Dereferencing the URI for a particular variable might lead to more information
about the syntax or semantics of that variable; specification of particular formats for this
information is out of scope for this document.To determine the URI for a given variable, the value given is used as a base URI in reference
resolution (as specified in ). If the resulting URI is still relative, the
context of the link is used as the base URI in a further resolution; see .For example:indicates that a resource with the relation type “http://example.org/rel/widget” can be found by
interpolating the “http://example.org/vars/widget_id” variable into the template given.If the current context of the message that the header appears within is “http://example.org/”, the
same information could be conveyed by this header field:The security consideration for the Link header field in and those for URI Templates
both apply.This specification enters the “Link-Template” into the registry of Permanent Message Header Field
Names.URI TemplateA URI Template is a compact sequence of characters for describing a range of Uniform Resource Identifiers through variable expansion. This specification defines the URI Template syntax and the process for expanding a URI Template into a URI reference, along with guidelines for the use of URI Templates on the Internet. [STANDARDS-TRACK]Uniform Resource Identifier (URI): Generic SyntaxA Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. This specification defines the generic URI syntax and a process for resolving URI references that might be in relative form, along with guidelines and security considerations for the use of URIs on the Internet. The URI syntax defines a grammar that is a superset of all valid URIs, allowing an implementation to parse the common components of a URI reference without knowing the scheme-specific requirements of every possible identifier. This specification does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme. [STANDARDS-TRACK]Web LinkingThis document specifies relation types for Web links, and defines a registry for them. It also defines the use of such links in HTTP headers with the Link header field. [STANDARDS-TRACK]Key words for use in RFCs to Indicate Requirement LevelsIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and RoutingThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the "http" and "https" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field ParametersBy default, message header field parameters in Hypertext Transfer Protocol (HTTP) messages cannot carry characters outside the ISO- 8859-1 character set. RFC 2231 defines an encoding mechanism for use in Multipurpose Internet Mail Extensions (MIME) headers. This document specifies an encoding suitable for use in HTTP header fields that is compatible with a profile of the encoding defined in RFC 2231. [STANDARDS-TRACK]