I’m using the FilesContainer returned by fetch() on a public website. Most of the structure is fairly self explanatory but I have a couple of questions.
Looking at the following subset of
PublishedSeqAppendOnlyData.resolved_from.public_name PublishedSeqAppendOnlyData.resolved_from.type_tag // 1500 PublishedSeqAppendOnlyData.resolved_from.version PublishedSeqAppendOnlyData.resolved_from.xorname PublishedSeqAppendOnlyData.resolved_from.xorurl PublishedSeqAppendOnlyData.type_tag // 1100 PublishedSeqAppendOnlyData.version PublishedSeqAppendOnlyData.xorname
I’m assuming that the first group of properties relate to the public name and the second to the
FilesContainer itself but am not sure, and also confused as to how to reference each.
My use case at the moment is to provide an ETag for the container that is being returned from a
safe.fetch() such as
An ETag is an HTTP response header (a string) that is guaranteed to change if the resource being retrieved is different from a previous fetch, and the same otherwise. So using an xor URL seems ideal for this, as that should always change if the root or any sub-path of it changes. Or does it?
What I’m not sure about is which value to use for the ETag, and whether to add a version string to the end of the URL. At the moment I have the following:
ETag = filesContainer.resolved_from.xorurl
This relates to the public name rather than the container, but any change to the latter should I hope change the xorurl of the public name. But I’m not sure if that’s the case, and if not whether just adding the version string (e.g. ‘?v=0’) would make it so.
- I’m wondering if really what I need is a URL based on
filesContainer.xorname, in which case I need to know how to convert that into a safe URI (asked in this post)?
- in either case, I’m not clear if the safe xor URI factors in the
versionor if I would also need to append
?v=nwhen the fetch is for
safe://dweb/and the same question for a sub-container such as