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

Function post

packages/plugins/graphql/src/api/handlers.test.ts:122–135  ·  view source on GitHub ↗
(
  web: { handler: (request: Request) => Promise<Response> },
  url: string,
  body: unknown,
)

Source from the content-addressed store, hash-verified

120};
121
122const post = (
123 web: { handler: (request: Request) => Promise<Response> },
124 url: string,
125 body: unknown,
126) =>
127 Effect.promise(() =>
128 web.handler(
129 new Request(url, {
130 method: "POST",
131 headers: { "content-type": "application/json" },
132 body: JSON.stringify(body),
133 }),
134 ),
135 );
136
137const get = (web: { handler: (request: Request) => Promise<Response> }, url: string) =>
138 Effect.promise(() => web.handler(new Request(url, { method: "GET" })));

Callers 1

handlers.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected