MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / handleProcRequest

Function handleProcRequest

packages/server/test/api/rpc.test.ts:173–186  ·  view source on GitHub ↗
(args: any)

Source from the content-addressed store, hash-verified

171
172 const handler = new RPCApiHandler({ schema: procClient.$schema });
173 const handleProcRequest = async (args: any) => {
174 const r = await handler.handleRequest({
175 ...args,
176 client: procClient,
177 url: new URL(`http://localhost/${args.path}`),
178 });
179 return {
180 status: r.status,
181 body: r.body as any,
182 data: (r.body as any).data,
183 error: (r.body as any).error,
184 meta: (r.body as any).meta,
185 };
186 };
187
188 // query procedure: GET only, args via q
189 let r = await handleProcRequest({

Callers 1

rpc.test.tsFile · 0.85

Calls 1

handleRequestMethod · 0.65

Tested by

no test coverage detected