orange
orange copied to clipboard
Api方式创建selector和rule返回500错误码
orange版本:0.8.0
接口请求:
curl http://xx.xx.xx.xx:7777/divide/selectors -X POST -H "Authorization:xxxx" -d '"selector":
{
"name": "add-by-api",
"type": 0,
"judge": {},
"handle": {
"continue": true,
"log": false
},
"enable": true
}'
// 后续 更改了请求体,参照 dashboard 的请求,必须添加一个 key 为 selector 才可以,例如
selector=%7B%22name%22%3A%22test1%22%2C%22type%22%3A0%2C%22judge%22%3A%7B%7D%2C%22handle%22%3A%7B%22continue%22%3Atrue%2C%22log%22%3Afalse%7D%2C%22enable%22%3Afalse%7D
也就是说,现有的键值对为 value ,再添加一个 selector 作为 key
@shuaijinchao @wujunze