angularjs - CORS workaround in Angular.js $HTTP POST? -
In addition to using a proxy, is there a way to send a post-request cross-domain to Coyon? The request has been rejected down, i.e.: option, net :: ERR_CONNECTION_REFUSED This is just the form data that I want to submit to a friend's local server for the school project. $ scope.postJSON = function () {var objJson = angular.toJson ($ scope.event); Console.log (angular.toJson ($ scope.event)); Delete $ Http.defaults.headers.common ['X-Requested-With']; $ Http ({method: 'POST', url: 'http://friendslocalserver.com', data: objJson}) Success (work () {console.log ("Post Jason object worked!")}} Error (Function () {console.log ("Post Jason Object Fails!");}); } You do not need to configure angularJS for the corrosion.
Comments
Post a Comment