Represents the http options that can be passed to a node http client.

interface NodeHttpHandlerOptions {
    connectionTimeout?: number;
    httpAgent?: Agent | AgentOptions;
    httpsAgent?: Agent | AgentOptions;
    logger?: Logger;
    requestTimeout?: number;
    socketAcquisitionWarningTimeout?: number;
    socketTimeout?: number;
}

Properties

connectionTimeout?: number

The maximum time in milliseconds that the connection phase of a request may take before the connection attempt is abandoned.

Defaults to 0, which disables the timeout.

httpAgent?: Agent | AgentOptions

You can pass http.Agent or its constructor options.

httpsAgent?: Agent | AgentOptions

You can pass https.Agent or its constructor options.

logger?: Logger

Optional logger.

requestTimeout?: number

The number of milliseconds a request can take before automatically being terminated. Defaults to 0, which disables the timeout.

socketAcquisitionWarningTimeout?: number

Delay before the NodeHttpHandler checks for socket exhaustion, and emits a warning if the active sockets and enqueued request count is greater than 2x the maxSockets count.

Defaults to connectionTimeout + requestTimeout or 3000ms if those are not set.

socketTimeout?: number

Deprecated

Use requestTimeout

The maximum time in milliseconds that a socket may remain idle before it is closed.