Fetch.variables.layer
Variable: layer
Section titled “Variable: layer”
constlayer:Layer<Fetch,never,never>
Defined in: packages/fx-fetch/src/Fetch/layer.ts:29
Fetch layer providing the live implementation.
Example
Section titled “Example”import { Effect } from 'effect';import { Fetch, Request } from 'fx-fetch';
const program = Effect.gen(function* () { const request = Request.unsafeMake({ url: 'https://example.com' }); const response = yield* Fetch.fetch(request);
return response;});
program.pipe( Effect.provide(Fetch.layer), // ◀︎── Provide Fetch layer Effect.runPromise);1.2.0