Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
17060 Discussions

Cross Origin Request Blocked

Rahul_T_
Beginner
559 Views

hey there. I am trying to get json using an http get request. I cannot since each time I get cross origin request blocked error. how do I enable cross origin request sharing? Also, if I want to use http post to upload values to another domain, how to proceed? I am a beginner and I would appreciate any help. thanks

0 Kudos
1 Reply
Elroy_A_Intel
Employee
559 Views

In order to enable cross origin request, you need to add the domain name of the site or server to the access list under the Projects > Build Settings panel  for your specificed project. 

You can find more information at https://software.intel.com/en-us/xdk/articles/cordova-cli-412-domain-whitelisting-with-intel-xdk-for-ajax-and-launching-external-apps.

You can implement post requests for example via jQuery in your application or AngularJS.

jQuery: http://api.jquery.com/jquery.post/

AngularJS: https://docs.angularjs.org/api/ng/service/$http

0 Kudos
Reply