Hi,
I am trying to create a provider-hosted app for SharePoint 2013. In this App I have a single page in my remote web application. Along with that I am provisioning a list in the App web also. Now I want to fetch data from the provisioned list from the App web to my remote web application page using client side code. For this I am following article given here. As explained in the article, I am using SharePoint cross-domain library “SP.RequestExecutor.js”. Now the code gives error at below line
executor.executeAsync(
{
url:
appweburl +
"/_api/web/lists/getbytitle('Announcements')/items",
method: "GET",
headers: { "Accept":"application/json; odata=verbose" },
success: successHandler,
error: errorHandler
}
);
Error : Could not complete cross-domain call: Your domain doesn't match the expected domain for this app deployment.