Ionic 4 project HTTP request I got an error
Access to XMLHttpRequest at ‘https://u*****test.f****t.co.in/getMccList’ from origin ‘http://localhost’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
I have added plugin cordova-plugin-whitelist
added chrome extension i run this app in android device and debug i chrome browser
this is my server HTTP request call
callserver(methodname, metadata, metainfo){
var TIMEOUT_REQUEST =10;
var request = {
"MetaData": metadata,
"MetaInfo": metainfo
};
const httpOptions = {headers: new HttpHeaders({'Content-Type': 'application/json'})};
return this.http.post(this.URL+methodname,request,httpOptions).pipe(
catchError(this.handleError)
);
}