# Response for preflight has invalid HTTP status code 405 error

**URL:** <https://forum.ionicframework.com/t/response-for-preflight-has-invalid-http-status-code-405-error/116528>\
**Category:** Ionic Native\
**Created:** [December 27, 2017, 4:40am UTC](https://forum.ionicframework.com/t/response-for-preflight-has-invalid-http-status-code-405-error/116528 "2017-12-27T04:40:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumaresanp](https://avatars.discourse-cdn.com/v4/letter/k/45deac/32.png) [@kumaresanp](https://forum.ionicframework.com/u/kumaresanp)\
**Post date:** [December 27, 2017, 4:40am UTC](https://forum.ionicframework.com/t/response-for-preflight-has-invalid-http-status-code-405-error/116528/1 "2017-12-27T04:40:17Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:57pm UTC](https://forum.ionicframework.com/t/response-for-preflight-has-invalid-http-status-code-405-error/116528/2 "2021-07-19T21:57:30Z")

</div>

Closed on July 19, 2021, 9:57pm UTC


