Layer.Layer<HttpAgent, never, never>Provides the HttpAgent service using default scoped Node http and
https agents.
export const const layerAgent: Layer.Layer<HttpAgent>const layerAgent: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<HttpAgent>, never, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Provides the HttpAgent service using default scoped Node http and
https agents.
layerAgent: import LayerLayer.interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<class HttpAgentclass HttpAgent {
key: Identifier;
Service: {
http: Http.Agent;
https: Https.Agent;
};
}
Service tag for the paired Node http and https agents used by the
node:http-backed HTTP client.
HttpAgent> = const layerAgentOptions: (
options?: Https.AgentOptions | undefined
) => Layer.Layer<HttpAgent>
Provides the HttpAgent service using scoped Node http and https
agents configured with the supplied options.
layerAgentOptions()