Skip to main content

Interface: SessionOptions

Defined in: src/types/options.ts:200

Session options - configure default behavior for all requests

Extends​

  • Omit<RequestOptions, "params" | "data" | "json" | "multipart" | "content" | "files" | "signal">

Properties​

acceptEncoding?​

optional acceptEncoding?: string

Defined in: src/types/options.ts:188

Accept-Encoding header (default: "gzip, deflate, br")

Inherited from​

RequestOptions.acceptEncoding


akamai?​

optional akamai?: string

Defined in: src/types/options.ts:152

Akamai HTTP/2 fingerprint

Inherited from​

RequestOptions.akamai


allowRedirects?​

optional allowRedirects?: boolean

Defined in: src/types/options.ts:126

Follow redirects (default: true)

Inherited from​

RequestOptions.allowRedirects


auth?​

optional auth?: AuthType

Defined in: src/types/options.ts:112

HTTP authentication

Inherited from​

RequestOptions.auth


baseUrl?​

optional baseUrl?: string

Defined in: src/types/options.ts:203

Base URL for all requests


caCert?​

optional caCert?: string

Defined in: src/types/options.ts:142

CA certificate bundle path

Inherited from​

RequestOptions.caCert


cert?​

optional cert?: string | CertConfig

Defined in: src/types/options.ts:144

Client certificate

Inherited from​

RequestOptions.cert


connectTimeout?​

optional connectTimeout?: number

Defined in: src/types/options.ts:118

Connection timeout in seconds

Inherited from​

RequestOptions.connectTimeout


contentCallback?​

optional contentCallback?: (chunk) => void

Defined in: src/types/options.ts:162

Content callback for streaming

Parameters​

chunk​

Buffer

Returns​

void

Inherited from​

RequestOptions.contentCallback


cookies?​

optional cookies?: CookiesInit

Defined in: src/types/options.ts:215

Default cookies for all requests

Overrides​

RequestOptions.cookies


curlOptions?​

optional curlOptions?: Record<number, unknown>

Defined in: src/types/options.ts:194

Raw curl options to set

Inherited from​

RequestOptions.curlOptions


decodeContent?​

optional decodeContent?: boolean

Defined in: src/types/options.ts:190

Decode response content automatically (default: true)

Inherited from​

RequestOptions.decodeContent


defaultHeaders?​

optional defaultHeaders?: boolean

Defined in: src/types/options.ts:156

Default headers when impersonating (default: true)

Inherited from​

RequestOptions.defaultHeaders


dnsServers?​

optional dnsServers?: string[]

Defined in: src/types/options.ts:180

DNS servers to use

Inherited from​

RequestOptions.dnsServers


dohUrl?​

optional dohUrl?: string

Defined in: src/types/options.ts:182

DNS-over-HTTPS URL

Inherited from​

RequestOptions.dohUrl


extraFp?​

optional extraFp?: ExtraFingerprint

Defined in: src/types/options.ts:154

Extra fingerprint options

Inherited from​

RequestOptions.extraFp


headerCallback?​

optional headerCallback?: (chunk) => void

Defined in: src/types/options.ts:164

Header callback for raw response header chunks

Parameters​

chunk​

Buffer

Returns​

void

Inherited from​

RequestOptions.headerCallback


headers?​

optional headers?: HeadersInit

Defined in: src/types/options.ts:213

Default headers for all requests

Overrides​

RequestOptions.headers


http2Multiplexing?​

optional http2Multiplexing?: boolean

Defined in: src/types/options.ts:209

Enable HTTP/2 multiplexing


httpVersion?​

optional httpVersion?: "2" | "3" | "1.0" | "1.1"

Defined in: src/types/options.ts:168

Force specific HTTP version ("1.0", "1.1", "2", "3")

Inherited from​

RequestOptions.httpVersion


impersonate?​

optional impersonate?: string | Fingerprint

Defined in: src/types/options.ts:148

Builtin/cached target name or an editable Fingerprint object

Inherited from​

RequestOptions.impersonate


interface?​

optional interface?: string

Defined in: src/types/options.ts:172

Network interface to use

Inherited from​

RequestOptions.interface


ja3?​

optional ja3?: string

Defined in: src/types/options.ts:150

JA3 fingerprint string

Inherited from​

RequestOptions.ja3


localAddress?​

optional localAddress?: string

Defined in: src/types/options.ts:174

Local address to bind to

Inherited from​

RequestOptions.localAddress


localPort?​

optional localPort?: number

Defined in: src/types/options.ts:176

Local port to bind to

Inherited from​

RequestOptions.localPort


maxConnections?​

optional maxConnections?: number

Defined in: src/types/options.ts:205

Maximum concurrent connections


maxHostConnections?​

optional maxHostConnections?: number

Defined in: src/types/options.ts:207

Maximum connections per host


maxRedirects?​

optional maxRedirects?: number

Defined in: src/types/options.ts:128

Maximum number of redirects (default: 30)

Inherited from​

RequestOptions.maxRedirects


proxies?​

optional proxies?: ProxyConfig

Defined in: src/types/options.ts:134

Protocol-specific proxies

Inherited from​

RequestOptions.proxies


proxy?​

optional proxy?: string

Defined in: src/types/options.ts:132

Proxy URL (applies to all protocols)

Inherited from​

RequestOptions.proxy


proxyAuth?​

optional proxyAuth?: BasicAuth

Defined in: src/types/options.ts:136

Proxy authentication

Inherited from​

RequestOptions.proxyAuth


readCallback?​

optional readCallback?: (size) => string | Buffer | null | undefined

Defined in: src/types/options.ts:98

Request body callback for streamed uploads

Parameters​

size​

number

Returns​

string | Buffer | null | undefined

Inherited from​

RequestOptions.readCallback


readCallbackSize?​

optional readCallbackSize?: number | bigint

Defined in: src/types/options.ts:100

Total byte size for readCallback request bodies

Inherited from​

RequestOptions.readCallbackSize


readTimeout?​

optional readTimeout?: number

Defined in: src/types/options.ts:120

Read timeout in seconds (same as timeout for simplicity)

Inherited from​

RequestOptions.readTimeout


referer?​

optional referer?: string

Defined in: src/types/options.ts:108

Referer header

Inherited from​

RequestOptions.referer


stream?​

optional stream?: boolean

Defined in: src/types/options.ts:160

Enable streaming response

Inherited from​

RequestOptions.stream


timeout?​

optional timeout?: number

Defined in: src/types/options.ts:116

Total request timeout in seconds

Inherited from​

RequestOptions.timeout


userAgent?​

optional userAgent?: string

Defined in: src/types/options.ts:186

User-Agent header

Inherited from​

RequestOptions.userAgent


verify?​

optional verify?: boolean

Defined in: src/types/options.ts:140

Verify SSL certificates (default: true)

Inherited from​

RequestOptions.verify