| 7 | |
| 8 | /** 外部 HTTP 请求配置 */ |
| 9 | export interface FetchRequestConfig { |
| 10 | url: string |
| 11 | method?: 'GET' | 'HEAD' |
| 12 | /** 请求超时(毫秒),默认 10s */ |
| 13 | timeout?: number |
| 14 | headers?: Record<string, string> |
| 15 | /** URL 代理模板,含 {url} 占位符,如 https://proxy.com/fetch?url={url} */ |
| 16 | proxyUrl?: string |
| 17 | } |
| 18 | |
| 19 | const HTML_HEADERS: Record<string, string> = { |
| 20 | Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', |
nothing calls this directly
no outgoing calls
no test coverage detected