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

Function postJson

e2e/cli/custom-tools-packed.test.ts:180–197  ·  view source on GitHub ↗
(
  target: TargetShape,
  identity: Identity,
  path: string,
  body?: unknown,
  timeoutMs?: number,
)

Source from the content-addressed store, hash-verified

178};
179
180const postJson = <T>(
181 target: TargetShape,
182 identity: Identity,
183 path: string,
184 body?: unknown,
185 timeoutMs?: number,
186): Promise<T> =>
187 request<T>(
188 target,
189 identity,
190 path,
191 {
192 method: "POST",
193 ...(body !== undefined ? { body: JSON.stringify(body) } : {}),
194 },
195 200,
196 timeoutMs,
197 );
198
199const deleteSource = (target: TargetShape, identity: Identity, slug: string): Effect.Effect<void> =>
200 Effect.promise(() =>

Callers 1

syncAndInvokeFunction · 0.70

Calls 1

requestFunction · 0.70

Tested by

no test coverage detected