Hi am not able to get data from server, can someone help me if I am wrong. Always I get alert as Read failed..
var url = "http://server:8000/sap/opu/odata/MOBPOPR/POPRAPP_SRV/ValidateApproverCollection/?$filter=Approverid eq 'supervisor' and Password eq 'welcome1'&$format=json";
var user = "mobtest";
var pass = "welcome1";
var oModel = new sap.ui.model.odata.ODataModel(url, true, user, pass);
oModel.read(url, null, null, true, function(oData, oResponse){
oModelJson.setData(oData);
alert("Read successful: " + JSON.stringify(oData)); },
function(){
alert("Read failed");});
The response json looks like this