I can use Chrome Advanced REST tools to test out a get list items request on the host web
http://mydev/records/_api/Web/Lists/GetByTitle('Uber Documents')/Items?$select=Title
Ok now I want to use a similar call in SharePoint hosted app that makes a cross domain call to Host Web from Appp Web.
var listName = "Uber Documents";
executor.executeAsync(
{
url: appweburl +
"/_api/SP.AppContextSite(@target)/web/lists/getbytitle('" + listName + "')/items?@target='" +
hostweburl + "'&$select=Title&$select=Target",
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: SuccessHandler,
error: errorHandler
I think my syntax is incorrect as the SuccessHandler fires but I get
Could not complete cross-domain call: Bad Request
Anybody got any tips on how you formulate the syntax.