linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
564 stars 143 forks source link

Add http HEAD handling #525

Open timbl opened 2 years ago

timbl commented 2 years ago

At the moment rdflib Store can keep track of the status of resources such as

but it doesn't have a state

So we can't efficiently do a HEAD to find out metadata about a resource, and then save that metadata but not the data. This proposal is to change that.

We do save the metadata of course from the HTTP headers already ona GET, and so this code could be reused for a HEAD.

One motivation: the editable() function needs to sometimes get this info, and a HEAD would fo -- though a HEAD would do. One motivation: If future Solid servers end up being poorer than the current NSS in the metadata they give about files in containers, then apps may need to do a lot of HEAD requests as the user browses the Solid system.