Interface: ImpersRequestInit
Defined in: src/http/fetch.ts:53
impers extension of the standard RequestInit.
Standard Fetch fields (method, headers, body, signal, redirect,
integrity, credentials, mode, referrer, referrerPolicy, window,
keepalive, duplex) are inherited from RequestInit and not redefined.
The following standard fields are currently ignored:
credentials, mode, integrity, keepalive, window, duplex,
referrerPolicy, referrer.
maxRedirects defaults to 20 (Fetch standard) rather than impers' usual 30.
Extends
RequestInit
Properties
acceptEncoding?
optionalacceptEncoding?:string
Defined in: src/http/fetch.ts:103
Accept-Encoding header (default: "gzip, deflate, br")
akamai?
optionalakamai?:string
Defined in: src/http/fetch.ts:61
Akamai HTTP/2 fingerprint
auth?
optionalauth?:AuthType
Defined in: src/http/fetch.ts:73
HTTP authentication
body?
optionalbody?:BodyInit|null
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1694
A BodyInit object or null to set request's body.
Inherited from
RequestInit.body
caCert?
optionalcaCert?:string
Defined in: src/http/fetch.ts:77
CA certificate bundle path
cache?
optionalcache?:RequestCache
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1696
A string indicating how the request will interact with the browser's cache to set request's cache.
Inherited from
RequestInit.cache
cert?
optionalcert?:string|CertConfig
Defined in: src/http/fetch.ts:79
Client certificate
connectTimeout?
optionalconnectTimeout?:number
Defined in: src/http/fetch.ts:83
Connection timeout in seconds
cookies?
optionalcookies?:CookiesInit
Defined in: src/http/fetch.ts:109
Request cookies
credentials?
optionalcredentials?:RequestCredentials
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1698
A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.
Inherited from
RequestInit.credentials
curlOptions?
optionalcurlOptions?:Record<number,unknown>
Defined in: src/http/fetch.ts:111
Raw curl options to set (escape hatch)
decodeContent?
optionaldecodeContent?:boolean
Defined in: src/http/fetch.ts:105
Decode response content automatically (default: true)
defaultHeaders?
optionaldefaultHeaders?:boolean
Defined in: src/http/fetch.ts:65
Default headers when impersonating (default: true)
dnsServers?
optionaldnsServers?:string[]
Defined in: src/http/fetch.ts:97
DNS servers to use
dohUrl?
optionaldohUrl?:string
Defined in: src/http/fetch.ts:99
DNS-over-HTTPS URL
extraFp?
optionalextraFp?:ExtraFingerprint
Defined in: src/http/fetch.ts:63
Extra fingerprint options
headers?
optionalheaders?:HeadersInit
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1700
A Headers object, an object literal, or an array of two-item arrays to set request's headers.
Inherited from
RequestInit.headers
httpVersion?
optionalhttpVersion?:"2"|"3"|"1.0"|"1.1"
Defined in: src/http/fetch.ts:89
Force specific HTTP version
impersonate?
optionalimpersonate?:string
Defined in: src/http/fetch.ts:57
Browser to impersonate (e.g. "chrome124", "firefox120")
integrity?
optionalintegrity?:string
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1702
A cryptographic hash of the resource to be fetched by request. Sets request's integrity.
Inherited from
RequestInit.integrity
interface?
optionalinterface?:string
Defined in: src/http/fetch.ts:91
Network interface to use
ja3?
optionalja3?:string
Defined in: src/http/fetch.ts:59
JA3 fingerprint string
keepalive?
optionalkeepalive?:boolean
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1704
A boolean to set request's keepalive.
Inherited from
RequestInit.keepalive
localAddress?
optionallocalAddress?:string
Defined in: src/http/fetch.ts:93
Local address to bind to
localPort?
optionallocalPort?:number
Defined in: src/http/fetch.ts:95
Local port to bind to
maxRedirects?
optionalmaxRedirects?:number
Defined in: src/http/fetch.ts:87
Maximum number of redirects (default: 20, Fetch standard)
method?
optionalmethod?:string
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1706
A string to set request's method.
Inherited from
RequestInit.method
mode?
optionalmode?:RequestMode
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1708
A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.
Inherited from
RequestInit.mode
params?
optionalparams?:Record<string,string|number|boolean| (string|number|boolean)[]> |URLSearchParams
Defined in: src/http/fetch.ts:55
Query string parameters
priority?
optionalpriority?:RequestPriority
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1709
Inherited from
RequestInit.priority
proxies?
optionalproxies?:ProxyConfig
Defined in: src/http/fetch.ts:69
Protocol-specific proxies
proxy?
optionalproxy?:string
Defined in: src/http/fetch.ts:67
Proxy URL (applies to all protocols)
proxyAuth?
optionalproxyAuth?:BasicAuth
Defined in: src/http/fetch.ts:71
Proxy authentication
readTimeout?
optionalreadTimeout?:number
Defined in: src/http/fetch.ts:85
Read timeout in seconds
redirect?
optionalredirect?:RequestRedirect
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1711
A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.
Inherited from
RequestInit.redirect
referer?
optionalreferer?:string
Defined in: src/http/fetch.ts:107
Referer header
referrer?
optionalreferrer?:string
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1713
A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.
Inherited from
RequestInit.referrer
referrerPolicy?
optionalreferrerPolicy?:ReferrerPolicy
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1715
A referrer policy to set request's referrerPolicy.
Inherited from
RequestInit.referrerPolicy
signal?
optionalsignal?:AbortSignal|null
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1717
An AbortSignal to set request's signal.
Inherited from
RequestInit.signal
timeout?
optionaltimeout?:number
Defined in: src/http/fetch.ts:81
Total request timeout in seconds
userAgent?
optionaluserAgent?:string
Defined in: src/http/fetch.ts:101
User-Agent header
verify?
optionalverify?:boolean
Defined in: src/http/fetch.ts:75
Verify SSL certificates (default: true)
window?
optionalwindow?:null
Defined in: docs/node_modules/typescript/lib/lib.dom.d.ts:1719
Can only be null. Used to disassociate request from any Window.
Inherited from
RequestInit.window