Next: , Previous: , Up: Top   [Contents][Index]


10 The HTTP Link header

The HTTP Link header lets you attach metadata about a resource, directly in the HTTP protocol. It is used to link resources to their auxiliary resources, for instance.

The following API is defined in (webid-oidc http-link):

The link refers to the target-iri that is being linked to the requested resource, with a given relation-type (a string), and optional additional target-attributes.

When constructing a <link>, you should use the #:target-iri, #:relation-type and #:target-attributes keyword arguments (#:target-attributes defaults to the empty list) to initialize the link. For convenience, the #:anchor, #:hreflang, #:media, #:title, #:title* and #:type keyword arguments can be passed to add well-known target attributes.

Class: <target-attribute> key value

If you wish to add new extension target attributes, you can create an ad-hoc target attribute with key and value (initialized as #:key and #:value constructor keyword arguments).

Generic: target-iri link
Generic: relation-type link
Generic: target-attributes link

Getters for the <link> class.

Generic: key target-attribute
Generic: value target-attribute

Getters for the <target-attribute> class.

Generic: target-attribute link key

Return the value of the first target attributet with key.

Generic: anchor link
Generic: hreflang link
Generic: media link
Generic: title link
Generic: title* link
Generic: type link

Convenience attribute lookup functions. anchor returns an URI referencce, the others return a string.

Declare functions to parse, validate and print HTTP Link headers with the Guile web request / response API.

Return the list of links in request or response.


Next: , Previous: , Up: Top   [Contents][Index]