MCPcopy Index your code
hub / github.com/BlockRunAI/ClawRouter / postJson

Function postJson

test/test-e2e.ts:377–392  ·  view source on GitHub ↗
(
  proxy: ProxyHandle,
  path: string,
  body: unknown,
  timeoutMs?: number,
)

Source from the content-addressed store, hash-verified

375}
376
377async function postJson(
378 proxy: ProxyHandle,
379 path: string,
380 body: unknown,
381 timeoutMs?: number,
382): Promise<Response> {
383 return fetchWithTimeout(
384 `${proxy.baseUrl}${path}`,
385 {
386 method: "POST",
387 headers: { "Content-Type": "application/json" },
388 body: JSON.stringify(body),
389 },
390 timeoutMs,
391 );
392}
393
394async function runTest(name: string, fn: () => Promise<string | void>): Promise<boolean> {
395 process.stdout.write(` ${name} ... `);

Callers 2

runLocalSuiteFunction · 0.70
runLiveSuiteFunction · 0.70

Calls 1

fetchWithTimeoutFunction · 0.85

Tested by

no test coverage detected