the-moby-effect
Version:
Moby/Docker API client built using effect-ts
11 lines • 654 B
JavaScript
import * as Effect from "effect/Effect";
import * as Function from "effect/Function";
import * as Layer from "effect/Layer";
import * as internalAgnostic from "./agnostic.js";
/** @internal */
export const makeWebHttpClientLayer = connectionOptions => {
const browserLayer = Function.pipe(Effect.promise(() => import("@effect/platform-browser/BrowserHttpClient")), Effect.map(browserHttpClientLazy => browserHttpClientLazy.layerXMLHttpRequest), Layer.unwrapEffect);
const agnosticHttpClientLayer = internalAgnostic.makeAgnosticLayer(connectionOptions);
return Layer.provide(agnosticHttpClientLayer, browserLayer);
};
//# sourceMappingURL=web.js.map