该文档提到了:XML,:JSON和:HTML,但是我有一个返回纯文本的URL。我想写
global {
datasource tests_executed:TEXT <- "http://saucelabs.com/rest/v1/info/counter"
}
rule how_many_tests {
pre {
count = datasource:tests_executed("");
msg = "Executed #{count} tests.";
}
notify("Saucelabs",msg) with sticky=true;
}
:XML,:JSON和:HTML是数据源的唯一有效格式吗?
最佳答案
XML,JSON和HTML是当前唯一有效的格式,但是如果Kynetx引擎无法将数据源解析为该格式,则它将其视为字符串。
关于datasource - :TEXT是KRL数据源的有效格式吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5820152/