Signature
Parameters
The URL to fetch. Can be a string or URL object.
Optional request configuration.
RequestInit options
HTTP method:
GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS.Request headers. Can be a
Headers object, plain object, or array of key-value pairs.Request body. Supported types:
string, Buffer, URLSearchParams, ArrayBuffer, and ArrayBufferView (for example Uint8Array).Browser fingerprint profile to use (e.g.,
'chrome_142', 'firefox_139').Operating system to emulate:
'windows', 'macos', 'linux', 'android', 'ios'.Proxy URL. Supports HTTP and SOCKS5 proxies.
Request timeout in milliseconds.
AbortSignal for cancelling the request.
Redirect handling mode. Supported:
'follow', 'manual', 'error'.When
true, prevents browser emulation headers from being automatically added.When
true, accepts invalid/self-signed certificates. Use only in development.Response
Returns aResponse object with:
status: HTTP status codestatusText: HTTP status textheaders: response headersok:trueif status is 200-299url: final URL after redirectsbody:ReadableStream<Uint8Array>ornullbodyUsed:trueif body has been consumed
Response methods
json(): parse body as JSONtext(): get body as stringarrayBuffer(): get body as ArrayBufferclone(): clone the response