MCPcopy Create free account
hub / github.com/tinyplex/tinybase / getPersisted

Function getPersisted

src/persisters/persister-remote/index.ts:26–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 let lastEtag: string = EMPTY_STRING;
25
26 const getPersisted = async (): Promise<Content> => {
27 const response = await fetch(loadUrl, {
28 headers: getIfNoneMatchHeaders(lastEtag),
29 });
30 lastEtag = getETag(response);
31 return jsonParse(await response.text());
32 };
33
34 const setPersisted = async (getContent: () => Content): Promise<any> =>
35 await fetch(saveUrl, {

Callers

nothing calls this directly

Calls 2

getIfNoneMatchHeadersFunction · 0.70
getETagFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…