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

Function makeApiClient

apps/cli/src/main.ts:1046–1058  ·  view source on GitHub ↗
(connection: ExecutorServerConnection)

Source from the content-addressed store, hash-verified

1044// ---------------------------------------------------------------------------
1045
1046const makeApiClient = (connection: ExecutorServerConnection) => {
1047 const authorization = getExecutorServerAuthorizationHeader(connection);
1048 return HttpApiClient.make(ExecutorApi, {
1049 baseUrl: connection.apiBaseUrl,
1050 ...(authorization
1051 ? {
1052 transformClient: HttpClient.mapRequest((request) =>
1053 HttpClientRequest.setHeader(request, "authorization", authorization),
1054 ),
1055 }
1056 : {}),
1057 }).pipe(Effect.provide(FetchHttpClient.layer));
1058};
1059
1060// ---------------------------------------------------------------------------
1061// Foreground session

Tested by

no test coverage detected