CORS error in AngularJS
When I am using Fiddler or any browser side HTTP client extension like Advanced Rest Client, I can get data from a API easily. But when I try to use the same API from Angular JS, CORS issue appear immediately. I have tried with following lines to solve the problem in AngularJS, But unfortunately it did not work. appd.config(function ($httpProvider) { // $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; // $httpProvider.defaults.headers.post['Accept'] = '*/*' $httpProvider.defaults.useXDomain = true; $httpProvider.defaults.withCredentials = true; delete
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.