MCPcopy Create free account
hub / github.com/dailydotdev/apps / fetchBoot

Function fetchBoot

packages/shared/src/lib/boot.ts:168–187  ·  view source on GitHub ↗
(
  bootURL: string,
  app: string,
  cookies?: string,
)

Source from the content-addressed store, hash-verified

166}
167
168const fetchBoot = async (
169 bootURL: string,
170 app: string,
171 cookies?: string,
172): Promise<Boot> => {
173 // Persisted by the CMP in the euconsent-v2 cookie on a previous page view —
174 // the CMP script loads after boot fires, so the live __tcfapi is never
175 // available here.
176 const res = await fetch(bootURL, {
177 method: 'GET',
178 credentials: 'include',
179 headers: {
180 app,
181 'Content-Type': 'application/json',
182 ...getStoredConsentHeaders(),
183 ...(cookies && { Cookie: cookies }),
184 },
185 });
186 return res.json();
187};
188
189export async function getBootData({
190 app,

Callers 1

getBootDataFunction · 0.85

Calls 1

getStoredConsentHeadersFunction · 0.90

Tested by

no test coverage detected