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

Function get

packages/core/api/src/admin/admin-users.test.ts:306–320  ·  view source on GitHub ↗
(
  web: {
    readonly handler: (request: Request, context: Context.Context<never>) => Promise<Response>;
  },
  path: string,
  credential?: string,
)

Source from the content-addressed store, hash-verified

304 );
305
306const get = (
307 web: {
308 readonly handler: (request: Request, context: Context.Context<never>) => Promise<Response>;
309 },
310 path: string,
311 credential?: string,
312) =>
313 Effect.promise(() =>
314 web.handler(
315 new Request(`http://localhost${path}`, {
316 headers: credential ? { authorization: credential } : {},
317 }),
318 Context.empty(),
319 ),
320 );
321
322const jsonOf = <A>(response: Response) => Effect.promise(() => response.json() as Promise<A>);
323

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected