Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api方式创建selector和rule返回500错误码 #396

Open
sydowma opened this issue Nov 25, 2019 · 1 comment
Open

Api方式创建selector和rule返回500错误码 #396

sydowma opened this issue Nov 25, 2019 · 1 comment

Comments

@sydowma
Copy link
Contributor

sydowma commented Nov 25, 2019

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
}'

image

// 后续
更改了请求体,参照 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

@sydowma
Copy link
Contributor Author

sydowma commented Nov 27, 2019

@shuaijinchao @wujunze

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant