我正在測試wireit,並且能夠創建新的表單容器等。我測試了ajax適配器例子,有它的ConfigEd類似:如何獲取Wireit json輸出?
WireIt.WiringEditor.adapters.Ajax.config = {
saveWiring: {
method: 'PUT',
url: 'http://voipd7.localhost/wirings.json'
},
deleteWiring: {
method: 'GET',
url: function(value) {
if(console && console.log) {
console.log(value);
}
// for a REST query you might want to send a DELETE /resource/wirings/moduleName
return "fakeSaveDelete.json";
}
},
listWirings: {
method: 'GET',
url: 'listWirings.json'
}
保存URL的「http://voipd7.localhost/wirings.json」是隻寫$ _GET或$ _ POST到一個PHP頁面文件,但它輸出的唯一東西是:
Array
(
[q] => wirings.json
)
我錯過了什麼嗎?不應該通過獲取或發佈發送json的東西?
啊,那東西讓我感覺到了。我已經改變了從發佈到發佈,直到現在沒有任何東西給我(使用file_get_contents)。 GET和POST仍然不起作用,但這必須是一個複雜的bug。 – that0n3guy