I need to access from a different domaine on a mobile a sharepoint list. Here is my code, a simple get request :
$.support.cors = true;
$(function() {
$().SPServices({
operation: "GetListItems",
webURL: "http://myurl.com/project/",
listName: "PM-Registration",
CAMLQuery: '<Query></Query>',
error: function (xhr, message, error) {
alert('error : ' + error);
},
completefunc: function (xData, status) {
alert('Status: '+status+' xdata: ' + xData.statusText);
alert('RESPONSE: ' + xData.responseText);
}
});
});
The problem seems to be CORS blocking the request, but I normally enable it before. It works perfectly with Chrome if I use the command : --args --disable-web-security, and with Safari desktop, but not with Firefox and Safari iOS... I got the error on Chrome without disabling web security :
No 'Access-Control-Allow-Origin' header is present on the requested resource
Am I missing something ? I guess it is a client side problem as it works with Chrome without web security and Safari Desktop