Response for preflight has invalid HTTP status code 404 in ionic


#1

export class RemoteserviceProvider {

constructor(public http: Http) {
console.log(‘Hello RemoteserviceProvider Provider’);
}
login(credentials) {
console.log(credentials);
var headers = new Headers( {‘X-API-KEY’ : ‘xxxxxxxxxxxxxxxxxxxxx’,‘Content-Type’:‘application/json’});
return new Promise((resolve, reject) => {
this.http.post(‘xxxxxxxxxxxxxxxxxxxxxxxxx’, credentials,{headers:headers})
.subscribe(res => {
resolve(res.json());
console.log(res);
console.log(“pass”);
}, (err) => {
reject(err);
console.log(“fail”);
});

});

what i did wrong here ??
Any one can help me to overcome this