/** * HTTP fetcher with redirect tracking, timeout, and charset detection. * * Ported from the Python `fetch_page.py` in claude-seo. Uses Node's native * fetch (Node 20+) with manual redirect handling to capture the full chain. */ import type { SeoConfig } from "../config.js"; import type { FetchResult } from "../types.js"; export interface FetchOptions { userAgent?: "default" | "googlebot" | string; timeout?: number; followRedirects?: boolean; maxRedirects?: number; /** Extra headers to send. */ headers?: Record; /** Whether to run SSRF protection (DNS-based private IP blocking). */ ssrfProtection?: boolean; /** Maximum decoded response size in bytes. */ maxResponseBytes?: number; /** Optional AbortSignal to cancel an in-flight request. */ signal?: AbortSignal; } /** * Fetch a URL with full redirect-chain tracking. * * Returns a FetchResult containing the final URL, status, headers, content, * and the complete redirect chain. */ export declare function fetchPage(url: string, config: SeoConfig, opts?: FetchOptions): Promise; /** Fetch a robots.txt file for a given URL's origin. */ export declare function fetchRobotsTxt(pageUrl: string, config: SeoConfig, opts?: FetchOptions): Promise; //# sourceMappingURL=fetcher.d.ts.map