What I've learned while developing with Cordova, Ionic, AngularJS and everything else I use to build mobile apps for Android and iOS.
Monday, March 2, 2015
Ionic - Testing AngularJS http PUT in browser
I'm posting this because I don't recall having this issue before, but when running ionic serve to test my app in the local browser, I was unable to successfully execute a PUT to update a piece of content in my browser.
PUT was working fine in POSTMAN, so my CMS was configured properly.
GET's were working just fine, I was able to display content from a web service.
POST and PUT would not work. I would get an Error returned, but with no error message and status code of 0. Weird.
Then I eventually ran the app on my device and it worked just fine!!! Huh?!?!? Yep, I executed the PUT and it worked ok.
At the time of this error/writing, I'm running Ionic 1.3.11
[UPDATE 01/13/2016] - I fixed this a long time ago, but though I should post the info. The problem was due to my server side configuration.
Adding the following for NGINX worked for me:
Access-Control-Allow-Origin: *
No comments:
Post a Comment