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

Function send

e2e/cloud/org-settings-mfa.test.ts:28–42  ·  view source on GitHub ↗
(
        headers: Readonly<Record<string, string>> | undefined,
        method: string,
        path: string,
        body?: unknown,
      )

Source from the content-addressed store, hash-verified

26 const unlocked = yield* verifyAdmin(target.baseUrl, locked);
27 yield* Effect.promise(async () => {
28 const send = (
29 headers: Readonly<Record<string, string>> | undefined,
30 method: string,
31 path: string,
32 body?: unknown,
33 ) =>
34 fetch(new URL(path, target.baseUrl), {
35 method,
36 headers: {
37 ...headers,
38 origin: new URL(target.baseUrl).origin,
39 "content-type": "application/json",
40 },
41 ...(body === undefined ? {} : { body: JSON.stringify(body) }),
42 });
43 for (const path of [
44 "/api/admin/users",
45 "/api/account/members",

Callers 1

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected