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