# Can't use "Options" in Post Call - Is there a way around this?

**URL:** <https://forum.ionicframework.com/t/cant-use-options-in-post-call-is-there-a-way-around-this/88952>\
**Category:** ionic-v3\
**Created:** [May 4, 2017, 2:57pm UTC](https://forum.ionicframework.com/t/cant-use-options-in-post-call-is-there-a-way-around-this/88952 "2017-05-04T14:57:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaidex](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jaidex/32/109034_2.png) [@Jaidex](https://forum.ionicframework.com/u/Jaidex)\
**Post date:** [May 4, 2017, 2:57pm UTC](https://forum.ionicframework.com/t/cant-use-options-in-post-call-is-there-a-way-around-this/88952/1 "2017-05-04T14:57:46Z")

</div>

All,

I’m getting the following message (on the server side) when I do a post in Ionic 2:

`Authentication method not supported: OPTIONS.`

the call I’m using is:

`this.http.post('https://mobile-qa.company.org/webapp/j_security_check', body, options)`

Is there a way to pass my headers into the post call without using the options parameter, or am I missing something?

Any help would be appreciated!

Jai

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [May 4, 2017, 5:11pm UTC](https://forum.ionicframework.com/t/cant-use-options-in-post-call-is-there-a-way-around-this/88952/2 "2017-05-04T17:11:02Z")

</div>

`OPTIONS` is the request method in this case.

For security reasons (“CORS” is the term to google) the browser sometimes does this “preflight request” first before he actually contacts the real URL: [https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS#Preflighted\_requests\_in\_CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS#Preflighted_requests_in_CORS)

You will have to implement this OPTIONS request in your backend.

---

<div class="post-metadata">

**Author:** ![Jaidex](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jaidex/32/109034_2.png) [@Jaidex](https://forum.ionicframework.com/u/Jaidex)\
**Post date:** [May 4, 2017, 6:03pm UTC](https://forum.ionicframework.com/t/cant-use-options-in-post-call-is-there-a-way-around-this/88952/3 "2017-05-04T18:03:48Z")

</div>

I don’t have any control of the backend - How can I work around this? Is there a way to send the headers that doesn’t require an OPTIONS call?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 4, 2017, 7:37pm UTC](https://forum.ionicframework.com/t/cant-use-options-in-post-call-is-there-a-way-around-this/88952/4 "2017-05-04T19:37:20Z")

</div>

Contact whoever does have control of the backend, especially if they’re claiming to be providing security testing services, and tell them that they need to implement CORS properly.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [May 4, 2017, 10:04pm UTC](https://forum.ionicframework.com/t/cant-use-options-in-post-call-is-there-a-way-around-this/88952/5 "2017-05-04T22:04:09Z")

</div>

No, but you can proxy these requests through your own server where you take care of the headers. That’s not the right solution, but it works. If you google for “CORS proxy” you might find ready made software or even hosted ones for development.
