ts-lambda-api - v2.5.3
    Preparing search index...

    Interface NodeHttpHandlerOptions

    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;
        throwOnRequestTimeout?: boolean;
    }
    Index

    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 maximum number of milliseconds request & response should take. Defaults to 0, which disables the timeout.

    If exceeded, a warning will be emitted unless throwOnRequestTimeout=true, in which case a TimeoutError will be thrown.

    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

    The maximum time in milliseconds that a socket may remain idle before it is closed. Defaults to 0, which means no maximum.

    This does not affect the server, which may still close the connection due to an idle socket.

    throwOnRequestTimeout?: boolean

    Because requestTimeout was for a long time incorrectly being set as a socket idle timeout, users must also opt-in for request timeout thrown errors. Without this setting, a breach of the request timeout will be logged as a warning.