MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / documentRequest

Function documentRequest

e2e/cloud/session-gate.test.ts:18–24  ·  view source on GitHub ↗
(url: URL, cookie?: string)

Source from the content-addressed store, hash-verified

16
17/** A signed-out-style document request (what the gate keys on). */
18const documentRequest = (url: URL, cookie?: string) =>
19 Effect.promise(() =>
20 fetch(url, {
21 redirect: "manual",
22 headers: { accept: "text/html", ...(cookie ? { cookie } : {}) },
23 }),
24 );
25
26const setCookieFor = (response: Response, name: string): string => {
27 for (const header of response.headers.getSetCookie()) {

Callers 1

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected