refactor(http): use context-backed API clients
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
10f269ceab
commit
8cf8c13d84
2 files changed
+4
-12
No files matched your search
@@ -116,12 +116,8 @@ const failLiveServerRequest = (cause: unknown) => {
|
||||
};
|
||||
|
||||
const makeLiveServerClient = (origin: string) =>
|
||||
Effect.gen(function* () {
|
||||
const httpClient = yield* HttpClient.HttpClient;
|
||||
return yield* HttpApiClient.makeWith(EnvironmentHttpApi, {
|
||||
baseUrl: origin,
|
||||
httpClient,
|
||||
});
|
||||
HttpApiClient.make(EnvironmentHttpApi, {
|
||||
baseUrl: origin,
|
||||
});
|
||||
|
||||
const normalizeWorkspaceRootForProjectCommand = Effect.fn(
|
||||
|
||||
@@ -170,12 +170,8 @@ const executeRemoteRequest = <A, E, R>(
|
||||
);
|
||||
|
||||
export const makeEnvironmentHttpApiClient = (httpBaseUrl: string) =>
|
||||
Effect.gen(function* () {
|
||||
const httpClient = yield* HttpClient.HttpClient;
|
||||
return yield* HttpApiClient.makeWith(EnvironmentHttpApi, {
|
||||
httpClient,
|
||||
baseUrl: remoteApiBaseUrl(httpBaseUrl),
|
||||
});
|
||||
HttpApiClient.make(EnvironmentHttpApi, {
|
||||
baseUrl: remoteApiBaseUrl(httpBaseUrl),
|
||||
});
|
||||
|
||||
export const exchangeRemoteDpopAccessToken = Effect.fn(
|
||||
|
||||
Reference in new issue
Block a user