Closed a2life closed 7 years ago
Hi,
can you check this commit for the Q dependency if its then working?
For the second point: o.js assuming that your service returning JSON by default or was using the v3 property $format=json
. Maybe we can set it as default value for all v4 services. Are you sure it is safe to set this header by default?
Regards Jan
Hi No dice. o.js:455 Uncaught TypeError: Cannot read property 'defer' of null
Also for the second point, I mentioned "content-type' but it is actually 'Accept' header that I need to set up. If you look at MS site page that explains SharePoint service page here, https://msdn.microsoft.com/en-us/library/office/dn531433.aspx
Accept header : Specifies the format for response data from the server. The default format is application/atom+xml. Example:
Okay, here another try. Can you pls test this version (sorry, I have no real test service any more)?
I think we could safely set the accept header to JSON. I will implement this enhancement as soon as we fix the promise bug.
Thank you, it is finally working.
Hi could you double check if q.js dependency was fixed in V-0.3.1? I am still seeing the 'defer' undefined error once I remove Q.js link from my markup.
I am also seeing unless I configure "content-type: application/json" in the header, SharePoint REST service returns xml payload instead of json, so the code bombs out at the first character of JSON.parse(response) . I am not sure if this is a particular issue with Microsoft SharePoint service.