call

tcmts.cli.test.e2e.prod.call · #lgoifapa · term · runs anywhere

import { get } from "#codebase/tcmts/cli/test/e2e/prod";

export const call = async (url: string, hash: string, args: unknown[]) => {
  const r = await get(new URL(`/__tcm/rpc/${hash}`, url), { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(args) });
  return { status: r.status, body: await r.text() };
}

uses

used by