更新环境 cookie
描述
更新指定浏览器环境的 Cookie 配置。
请求格式
请求方法:
POST
请求 URL
/api/updateBrowserCookie
请求参数
参数名 | 类型 | 必填 | 描述 |
---|---|---|---|
id | int | 是 | 浏览器 ID |
cookie.mode | int | 否 | Cookie 模式(0-关闭,1-开启) |
cookie.value | string | 否 | Cookie 字符串值 |
cookie.jsonStr | string | 否 | Cookie JSON 格式 |
请求示例
json
{
"id": 1,
"cookie": {
"mode": 1,
"value": "sessionId=abc123; userId=12345",
"jsonStr": "[{\"name\":\"sessionId\",\"value\":\"abc123\",\"domain\":\".example.com\"}]"
}
}
响应示例
成功
json
{
"success": true,
"message": "Cookie updated successfully"
}
错误
json
{
"success": false,
"error": "Browser not found"
}