我是OpenDaylight控制器的新手,我在尝试使用Rest api发布OpenDaylight时遇到此错误 .
function UserAction() {
var xhttp = new XMLHttpRequest();
xhttp.open("POST", "http://localhost:8181/restconf/config/SecAser:SecAser/",
false);
xhttp.setRequestHeader("Content-type", "application/json");
var parameters={
"attacks": [
{
"id":"4",
"attack-match":"Sniffing",
"etat":"true"
}
]
}
//JSON.stringify(parameters);
xhttp.setRequestHeader("Content-type", "application/json");
xhttp.send(parameters);
var response = JSON.parse(xhttp.responseText);
alert(xhttp.responseText);
}
这是数据源
![like a database]](https://i.stack.imgur.com/Nqi06.png)
2 回答
它完成了结构
您可以在OpenDaylight Netvirt Postman collections中找到常用REST请求的示例 .