I'm trying to read simple OData v4 endpoint with Olingo OData Client for JavaScript (odatajs).
Olingo odatajs webpage says:
You may also use the documentation and the samples from the datajs library because the features and API are similar.
So I tried to read OData endpoint with this piece of code:
odatajs.read(uri, function (data) {
alert(JSON.stringify(data));
}, function (err) {
alert(JSON.stringify(err));
});
But the code gives this error:
Uncaught TypeError: undefined is not a function
With jquery/ajax it always calls error function, but you can see the response with fiddler.
this is an test case from odatajs git repository, hope it is helpful: