I want to access an api's data of this url : 'http://apis.coursefrenzy.com/courses/' i also have declared the all modules properly...
i tried to access with 'get()' method of 'HttpClient' class i.e. get(this.api, {headers: apiheader})
const httpOptions = {
headers: new HttpHeaders({
'Content-type': 'application/json',
'Autorization': 'EpCuVuAOPGfoXNyXtDxDxNIozMxQ
7TC9W9C9FBlZsgUExQLH2zNOmFmWKnMBKKPE'
})
};
api="http://apis.coursefrenzy.com/courses/";
getUser(){
return this.http.get(this.api, {headers: httpOptions.headers});
}
when i subscribe to this get methode and cosole the data, then i have recieved and error in console...
Access to XMLHttpRequest at 'http://apis.coursefrenzy.com/courses/' from origin 'http://localhost:6565' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.enter image description here