Documentation Index
Fetch the complete documentation index at: https://mintlify.com/clyrisai/gitresolve/llms.txt
Use this file to discover all available pages before exploring further.
FetchProvider is the lightest option in GitResolve’s provider stack. It uses the fetch API that ships with Node.js 18+ to download page HTML over HTTP, without spinning up a browser process or requiring any additional packages. Because no external module needs to be imported, isAvailable() always returns true — making it the guaranteed fallback at the end of the auto-detection chain.
When to use
- Static portfolio sites and plain HTML pages that don’t rely on client-side rendering
- GitHub and GitLab profile pages, which are server-rendered and work perfectly with a standard HTTP request
- Constrained environments such as serverless functions, edge runtimes, or containers where installing a browser binary is not feasible
- Fallback behaviour when neither Puppeteer nor Browserless is available
Installation
No installation is required.FetchProvider depends only on the native fetch global available in Node.js 18 and later. If you have already installed @clyrisai/gitresolve, you are ready to go.
Usage
Direct instantiation
Via the factory
CLI
To useFetchProvider from the command line, set the BROWSER_PROVIDER environment variable:
Options
| Option | Type | Default | Description |
|---|---|---|---|
timeout | number | 15000 | Maximum milliseconds to wait for the response before aborting. |
waitUntil | — | N/A | Not applicable. FetchProvider returns the raw HTTP response body as soon as it is fully received. |
Custom timeout example
Behaviour details
| Property | Value |
|---|---|
name | 'fetch' |
User-Agent | Mozilla/5.0 (compatible; ClyrisBot/1.0) |
| Redirect handling | redirect: 'follow' — follows all HTTP redirects automatically |
| Non-2xx responses | Throws Error: Fetch failed with <status>: <statusText> |
isAvailable() | Always resolves to true |
cleanup() | No-op — there are no resources to release |
The
Accept header is set to text/html,application/xhtml+xml on every request, which encourages servers to return a browser-friendly HTML response rather than a JSON or API payload.