1
我正在嘗試使用Olingo OData Client for JavaScript(odatajs)來讀取簡單的OData v4端點。如何使用odatajs讀取OData v4端點?
Olingo odatajs網頁說:
You may also use the documentation and the samples from the datajs library because the features and API are similar.
所以,我想用這段代碼閱讀的OData端點:
odatajs.read(uri, function (data) {
alert(JSON.stringify(data));
}, function (err) {
alert(JSON.stringify(err));
});
但代碼給出了這樣的錯誤:
Uncaught TypeError: undefined is not a function
使用jquery/ajax它總是調用錯誤函數,但是您可以看到用提琴手的響應。