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

Function getBootData

packages/shared/src/lib/boot.ts:158–176  ·  view source on GitHub ↗
({
  app,
  url,
  cookies,
  pathname,
}: GetBootDataParams)

Source from the content-addressed store, hash-verified

156}
157
158export async function getBootData({
159 app,
160 url,
161 cookies,
162 pathname,
163}: GetBootDataParams): Promise<Boot> {
164 const bootURL = getBootURL(app, url, pathname);
165 const res = await fetch(bootURL, {
166 method: 'GET',
167 credentials: 'include',
168 headers: {
169 app,
170 'Content-Type': 'application/json',
171 ...(cookies && { Cookie: cookies }),
172 },
173 });
174 const result = await res.json();
175 return enrichBootWithFeatures(result);
176}

Callers 1

BootDataProviderFunction · 0.90

Calls 2

getBootURLFunction · 0.85
enrichBootWithFeaturesFunction · 0.85

Tested by

no test coverage detected