I am getting below error in Angularjs
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://.../... (Reason: CORS header 'Access-Control-Allow-Origin' missing).
below is my code:
$http({
method: 'GET',
url:"https://logis../oms/rest/TMS/../listTenders/1.0",
headers: { 'Authorization': 'Basic Q2FycmllckFUcmFuc01ncjpwYXNzd29yZA=='}
}).success(function (response) {
console.log("response--"+response);
resolve(response);
}).error(function (error) {
console.log("error123--"+error)
reject(error);
});
I am using GET request in AngularJs and getting above error. So can any one help me if any thing is missing from client side or any thing is remaining from Server Side Server side is written in Java So please help me out. Thanks
I got the same error.. Try calling the url from ur server side language (PHP or NOde)... Youll always get CORS error if u use a client side language(angular or normal AJAX) to call it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With