Interface FetchH2Http1Options

Overview

The options available for the DataAPIClient related to making HTTP/1.1 requests with fetch-h2.

To set related options for fetch, you may use in a custom Undici Dispatcher (or your environment's equivalent) by extending FetchNative and setting init.dispatcher. See FetchHttpClientOptions for more information.

See

FetchH2HttpClientOptions

interface FetchH2Http1Options {
    keepAlive?: boolean;
    keepAliveMS?: number;
    maxFreeSockets?: number;
    maxSockets?: number;
}

Properties

keepAlive?: boolean

Whether to keep the connection alive for future requests. This is generally recommended for better performance.

Defaults to true.

Default Value

true
keepAliveMS?: number

The delay (in milliseconds) before keep-alive probing.

Defaults to 1000ms.

Default Value

1000
maxFreeSockets?: number

Maximum number of lingering sockets, waiting to be re-used for new requests.

Defaults to Infinity.

Default Value

Infinity
maxSockets?: number

Maximum number of sockets to allow per origin.

Defaults to 256.

Default Value

256