Response for preflight has invalid HTTP status code 405 error


#1

I got “Response for preflight has invalid HTTP status code 405” error while accessing WCF rest service from ionic 3 angular 5 (latest)

Below is my code
addNewCategory(sData) {
return new Promise((resolve, reject) =>{
debugger;
let addCategory: any = {“CategoryId”: sData.categoryId, “CategoryName”: sData.categoryName};
this.http.post(“http://avvaikumar-001-site1.1tempurl.com/akgroservice.svc/AddCategory”, JSON.stringify({ ‘pCategory’: addCategory }),{
headers: { ‘Content-Type’: ‘application/json’}
}).subscribe(result => {
resolve(result);
}, (err) => {
reject(err);
console.log(err);
})
})
}

The above URL work well in Chrome post man tool without any issues. Please help me to get out from this error.
Note: I will reply to your question when I return back to work.
Thanks