{
  "id": "__yao.http",
  "title": "HTTP 网络获取器",
  "description": "使用 HTTP/HTTPS 协议从网络 URL 获取内容。支持自定义头部、用户代理配置和超时设置，用于可靠的网络内容检索。",
  "required": [],
  "properties": {
    "headers": {
      "type": "object",
      "title": "自定义头部",
      "description": "请求中包含的自定义 HTTP 头部。",
      "required": false,
      "component": "Nested",
      "width": "full",
      "order": 1,
      "properties": {
        "Authorization": {
          "type": "string",
          "title": "授权",
          "description": "用于身份验证请求的授权头部。",
          "default": "",
          "component": "Input",
          "placeholder": "Bearer token 或 Basic auth",
          "width": "full",
          "order": 1
        },
        "Accept": {
          "type": "string",
          "title": "接受",
          "description": "指定首选内容类型的接受头部。",
          "default": "*/*",
          "component": "Select",
          "enum": [
            {
              "label": "所有类型",
              "value": "*/*",
              "description": "接受任何内容类型",
              "default": true
            },
            {
              "label": "HTML",
              "value": "text/html",
              "description": "仅 HTML 文档"
            },
            {
              "label": "JSON",
              "value": "application/json",
              "description": "仅 JSON 数据"
            },
            {
              "label": "XML",
              "value": "application/xml,text/xml",
              "description": "XML 文档"
            },
            {
              "label": "纯文本",
              "value": "text/plain",
              "description": "纯文本内容"
            }
          ],
          "width": "half",
          "order": 2
        },
        "Accept-Language": {
          "type": "string",
          "title": "接受语言",
          "description": "内容的首选语言。",
          "default": "zh-CN,zh;q=0.9,en;q=0.8",
          "component": "Input",
          "placeholder": "zh-CN,zh;q=0.9,en-US;q=0.8",
          "width": "half",
          "order": 3
        },
        "Referer": {
          "type": "string",
          "title": "引用页",
          "description": "请求的引用页头部。",
          "default": "",
          "component": "Input",
          "placeholder": "https://example.com",
          "width": "full",
          "order": 4
        },
        "Cookie": {
          "type": "string",
          "title": "Cookie",
          "description": "用于会话管理的 Cookie 头部。",
          "default": "",
          "component": "Input",
          "placeholder": "session=abc123; preference=light",
          "width": "full",
          "order": 5
        }
      }
    },
    "user_agent": {
      "type": "string",
      "title": "用户代理",
      "description": "用于标识获取器的用户代理字符串。",
      "default": "GraphRAG-Fetcher/1.0",
      "component": "Select",
      "enum": [
        {
          "label": "默认 GraphRAG",
          "value": "GraphRAG-Fetcher/1.0",
          "description": "默认 GraphRAG 获取器用户代理",
          "default": true
        },
        {
          "label": "Chrome 桌面版",
          "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
          "description": "Windows 上的 Chrome 浏览器"
        },
        {
          "label": "Firefox 桌面版",
          "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0",
          "description": "Windows 上的 Firefox 浏览器"
        },
        {
          "label": "Safari macOS",
          "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Version/17.0 Safari/537.36",
          "description": "macOS 上的 Safari 浏览器"
        },
        {
          "label": "移动端 Chrome",
          "value": "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36",
          "description": "Android 上的 Chrome 浏览器"
        },
        {
          "label": "自定义",
          "value": "",
          "description": "在下方输入自定义用户代理"
        }
      ],
      "width": "full",
      "order": 2
    },
    "custom_user_agent": {
      "type": "string",
      "title": "自定义用户代理",
      "description": "自定义用户代理字符串（在上方选择\"自定义\"时使用）。",
      "default": "",
      "component": "Input",
      "placeholder": "您的自定义用户代理字符串",
      "width": "full",
      "order": 3
    },
    "timeout": {
      "type": "integer",
      "title": "超时时间（秒）",
      "description": "请求超时时间，以秒为单位。",
      "default": 300,
      "minimum": 5,
      "maximum": 3600,
      "component": "InputNumber",
      "width": "half",
      "order": 4
    },
    "follow_redirects": {
      "type": "boolean",
      "title": "跟随重定向",
      "description": "自动跟随 HTTP 重定向。",
      "default": true,
      "component": "Switch",
      "width": "half",
      "order": 5
    },
    "max_redirects": {
      "type": "integer",
      "title": "最大重定向次数",
      "description": "要跟随的最大重定向次数。",
      "default": 10,
      "minimum": 0,
      "maximum": 50,
      "component": "InputNumber",
      "width": "half",
      "order": 6
    },
    "verify_ssl": {
      "type": "boolean",
      "title": "验证 SSL",
      "description": "验证 HTTPS 请求的 SSL 证书。",
      "default": true,
      "component": "Switch",
      "width": "half",
      "order": 7
    }
  }
}
