UNPKG

the-moby-effect

Version:
11 lines 654 B
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