fetchPage
function fetchPage(url: string, options?: GuardedFetchOptions): Promise<string>;Fetch a page and return its text, with the honest bot User-Agent, the SSRF guard, the deadline, and the size cap. Throws on a non-200.
A cap rejection throws an error isTooLargeError recognizes, so a caller can treat it as permanent rather than retry it forever.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
url | string | The address to fetch. |
options | GuardedFetchOptions | Cap, headers, fetch, and timeout overrides. |
Returns
Section titled “Returns”Promise<string>
The decoded body.