Skip to main content Link Search Menu Expand Document (external link)

NodeHttpClient overview

Added in v1.0.0


Table of contents


agent

HttpAgent

Signature

export declare const HttpAgent: Context.Tag<HttpAgent, HttpAgent>

Added in v1.0.0

HttpAgent (interface)

Signature

export interface HttpAgent {
  readonly [HttpAgentTypeId]: typeof HttpAgentTypeId
  readonly http: Http.Agent
  readonly https: Https.Agent
}

Added in v1.0.0

HttpAgentTypeId

Signature

export declare const HttpAgentTypeId: typeof HttpAgentTypeId

Added in v1.0.0

HttpAgentTypeId (type alias)

Signature

export type HttpAgentTypeId = typeof HttpAgentTypeId

Added in v1.0.0

agentLayer

Signature

export declare const agentLayer: Layer.Layer<HttpAgent>

Added in v1.0.0

makeAgent

Signature

export declare const makeAgent: (options?: Https.AgentOptions) => Effect.Effect<HttpAgent, never, Scope.Scope>

Added in v1.0.0

makeAgentLayer

Signature

export declare const makeAgentLayer: (options?: Https.AgentOptions) => Layer.Layer<HttpAgent>

Added in v1.0.0

constructors

make

Signature

export declare const make: Effect.Effect<Client.Client.Default, never, HttpAgent>

Added in v1.0.0

makeUndici

Signature

export declare const makeUndici: (dispatcher: Undici.Dispatcher) => Client.Client.Default

Added in v1.0.0

layers

layer

Signature

export declare const layer: Layer.Layer<Client.Client.Default>

Added in v1.0.0

layerUndici

Signature

export declare const layerUndici: Layer.Layer<Client.Client.Default>

Added in v1.0.0

layerUndiciWithoutDispatcher

Signature

export declare const layerUndiciWithoutDispatcher: Layer.Layer<Client.Client.Default, never, Dispatcher>

Added in v1.0.0

layerWithoutAgent

Signature

export declare const layerWithoutAgent: Layer.Layer<Client.Client.Default, never, HttpAgent>

Added in v1.0.0

undici

Dispatcher

Signature

export declare const Dispatcher: Context.Tag<Dispatcher, Undici.Dispatcher>

Added in v1.0.0

Dispatcher (interface)

Signature

export interface Dispatcher {
  readonly _: unique symbol
}

Added in v1.0.0

currentUndiciOptions

Signature

export declare const currentUndiciOptions: FiberRef.FiberRef<Partial<Undici.Dispatcher.RequestOptions>>

Added in v1.0.0

dispatcherLayer

Signature

export declare const dispatcherLayer: Layer.Layer<Dispatcher>

Added in v1.0.0

dispatcherLayerGlobal

Signature

export declare const dispatcherLayerGlobal: Layer.Layer<Dispatcher>

Added in v1.0.0

makeDispatcher

Signature

export declare const makeDispatcher: Effect.Effect<Undici.Dispatcher, never, Scope.Scope>

Added in v1.0.0

withUndiciOptions

Signature

export declare const withUndiciOptions: {
  (
    options: Partial<Undici.Dispatcher.RequestOptions>
  ): <R, E, A>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>
  <R, E, A>(effect: Effect.Effect<A, E, R>, options: Partial<Undici.Dispatcher.RequestOptions>): Effect.Effect<A, E, R>
}

Added in v1.0.0