Hey Greg, CORS and JSONP are not going to work together. As you can't really add any authentication headers to the JSONP request. Not in the "default" way. As JSONP is pretty much just a fancy way of doing a <script> tag.
You could do a normal GET with CORS and then eval() the response, if for whatever reason you really need to do JSONP. But if you're just trying to get some data when using CORS then just use normal JSON like Morten suggested. Regards, Mark On 3 Jun 2015, at 11:19, Morten Olav Hansen <[email protected]<mailto:[email protected]>> wrote: Hi Greg I don't have an example here, but all you really need to do is to add a Authotization header (to your $.ajax or what you are using) and it should work, I havent played around with credentials directly (but this is also probably supported? I know jquery have withCredentials etc) What is important is that you add the domain where the request is coming from to the CORS whitelist (system settings, remove access), if will not work if you don't do this. Btw, since you are using CORS, you don't need to use JSONP, you can just use JSON/XML as normal. -- Morten On Wed, Jun 3, 2015 at 4:09 PM, Greg Rowles <[email protected]<mailto:[email protected]>> wrote: Hi Devs I'm testing JSONP capabilities against version 2.19 but struggling a little to be honest. Does anyone have a code sample that works against the demo instance or similar? Thank you, Greg -- Health Information Systems Program - South Africa - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mobile : 073 246 2992 Landline: 021 554 3130 Fax: 086 733 8432 Skype: gregory_rowles _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected]<mailto:[email protected]> Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected]<mailto:[email protected]> Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

