MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / addLink

Function addLink

lib/header.mjs:11–18  ·  view source on GitHub ↗
(res, value, rel)

Source from the content-addressed store, hash-verified

9const PERMISSIONS = MODES.map(m => m.toLowerCase())
10
11export function addLink (res, value, rel) {
12 const oldLink = res.get('Link')
13 if (oldLink === undefined) {
14 res.set('Link', '<' + value + '>; rel="' + rel + '"')
15 } else {
16 res.set('Link', oldLink + ', ' + '<' + value + '>; rel="' + rel + '"')
17 }
18}
19
20export function addLinks (res, fileMetadata) {
21 if (fileMetadata.isResource) {

Callers 4

linkAuthProviderFunction · 0.90
linkServiceEndpointFunction · 0.90
addLinksFunction · 0.85
linksHandlerFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected