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

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -