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?
optionalacceptEncoding?:string
Defined in: src/types/options.ts:188
Accept-Encoding header (default: "gzip, deflate, br")
Inherited from
akamai?
optionalakamai?:string
Defined in: src/types/options.ts:152
Akamai HTTP/2 fingerprint
Inherited from
allowRedirects?
optionalallowRedirects?:boolean
Defined in: src/types/options.ts:126
Follow redirects (default: true)
Inherited from
auth?
optionalauth?:AuthType
Defined in: src/types/options.ts:112
HTTP authentication
Inherited from
baseUrl?
optionalbaseUrl?:string
Defined in: src/types/options.ts:203
Base URL for all requests
caCert?
optionalcaCert?:string
Defined in: src/types/options.ts:142
CA certificate bundle path
Inherited from
cert?
optionalcert?:string|CertConfig
Defined in: src/types/options.ts:144
Client certificate
Inherited from
connectTimeout?
optionalconnectTimeout?:number
Defined in: src/types/options.ts:118
Connection timeout in seconds
Inherited from
contentCallback?
optionalcontentCallback?: (chunk) =>void
Defined in: src/types/options.ts:162
Content callback for streaming
Parameters
chunk
Buffer
Returns
void
Inherited from
RequestOptions.contentCallback
cookies?
optionalcookies?:CookiesInit
Defined in: src/types/options.ts:215
Default cookies for all requests
Overrides
curlOptions?
optionalcurlOptions?:Record<number,unknown>
Defined in: src/types/options.ts:194
Raw curl options to set
Inherited from
decodeContent?
optionaldecodeContent?:boolean
Defined in: src/types/options.ts:190
Decode response content automatically (default: true)
Inherited from
defaultHeaders?
optionaldefaultHeaders?:boolean
Defined in: src/types/options.ts:156
Default headers when impersonating (default: true)
Inherited from
dnsServers?
optionaldnsServers?:string[]
Defined in: src/types/options.ts:180
DNS servers to use
Inherited from
dohUrl?
optionaldohUrl?:string
Defined in: src/types/options.ts:182
DNS-over-HTTPS URL
Inherited from
extraFp?
optionalextraFp?:ExtraFingerprint
Defined in: src/types/options.ts:154
Extra fingerprint options
Inherited from
headerCallback?
optionalheaderCallback?: (chunk) =>void
Defined in: src/types/options.ts:164
Header callback for raw response header chunks
Parameters
chunk
Buffer
Returns
void
Inherited from
headers?
optionalheaders?:HeadersInit
Defined in: src/types/options.ts:213
Default headers for all requests
Overrides
http2Multiplexing?
optionalhttp2Multiplexing?:boolean
Defined in: src/types/options.ts:209
Enable HTTP/2 multiplexing
httpVersion?
optionalhttpVersion?:"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
impersonate?
optionalimpersonate?:string|Fingerprint
Defined in: src/types/options.ts:148
Builtin/cached target name or an editable Fingerprint object
Inherited from
interface?
optionalinterface?:string
Defined in: src/types/options.ts:172
Network interface to use
Inherited from
ja3?
optionalja3?:string
Defined in: src/types/options.ts:150
JA3 fingerprint string
Inherited from
localAddress?
optionallocalAddress?:string
Defined in: src/types/options.ts:174
Local address to bind to
Inherited from
localPort?
optionallocalPort?:number
Defined in: src/types/options.ts:176
Local port to bind to
Inherited from
maxConnections?
optionalmaxConnections?:number
Defined in: src/types/options.ts:205
Maximum concurrent connections
maxHostConnections?
optionalmaxHostConnections?:number
Defined in: src/types/options.ts:207
Maximum connections per host
maxRedirects?
optionalmaxRedirects?:number
Defined in: src/types/options.ts:128
Maximum number of redirects (default: 30)
Inherited from
proxies?
optionalproxies?:ProxyConfig
Defined in: src/types/options.ts:134
Protocol-specific proxies
Inherited from
proxy?
optionalproxy?:string
Defined in: src/types/options.ts:132
Proxy URL (applies to all protocols)
Inherited from
proxyAuth?
optionalproxyAuth?:BasicAuth
Defined in: src/types/options.ts:136
Proxy authentication
Inherited from
readCallback?
optionalreadCallback?: (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
readCallbackSize?
optionalreadCallbackSize?:number|bigint
Defined in: src/types/options.ts:100
Total byte size for readCallback request bodies
Inherited from
RequestOptions.readCallbackSize
readTimeout?
optionalreadTimeout?:number
Defined in: src/types/options.ts:120
Read timeout in seconds (same as timeout for simplicity)
Inherited from
referer?
optionalreferer?:string
Defined in: src/types/options.ts:108
Referer header
Inherited from
stream?
optionalstream?:boolean
Defined in: src/types/options.ts:160
Enable streaming response
Inherited from
timeout?
optionaltimeout?:number
Defined in: src/types/options.ts:116
Total request timeout in seconds
Inherited from
userAgent?
optionaluserAgent?:string
Defined in: src/types/options.ts:186
User-Agent header
Inherited from
verify?
optionalverify?:boolean
Defined in: src/types/options.ts:140
Verify SSL certificates (default: true)