({
app,
url,
cookies,
pathname,
}: GetBootDataParams)
| 156 | } |
| 157 | |
| 158 | export 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 | } |
no test coverage detected