Interface TransportOptions

Transport-level options for HTTP requests.

These options control connection reuse, compression, buffer sizes, and other low-level transport behaviors.

interface TransportOptions {
    disableCompression: boolean;
    disableKeepAlives: boolean;
    idleConnTimeout: number;
    maxConnsPerHost: number;
    maxIdleConns: number;
    maxIdleConnsPerHost: number;
    maxResponseHeaderBytes: number;
    readBufferSize: number;
    writeBufferSize: number;
}

Properties

disableCompression: boolean

If true, disables automatic response decompression (gzip, deflate, etc.).

disableKeepAlives: boolean

If true, disables HTTP keep-alive connections.

idleConnTimeout: number

The maximum idle connection timeout, in nanoseconds.

maxConnsPerHost: number

The maximum number of total connections per host (idle + active).

maxIdleConns: number

The maximum number of idle (keep-alive) connections across all hosts.

maxIdleConnsPerHost: number

The maximum number of idle (keep-alive) connections to keep per-host.

maxResponseHeaderBytes: number

The maximum number of bytes allowed in response headers. If zero, a default is used.

readBufferSize: number

The size of the read buffer in bytes. If zero, a default (typically 4KB) is used.

writeBufferSize: number

The size of the write buffer in bytes. If zero, a default (typically 4KB) is used.