# Custom http headers

**URL:** <https://forum.ionicframework.com/t/custom-http-headers/108386>\
**Category:** ionic-v3\
**Created:** [October 10, 2017, 3:59pm UTC](https://forum.ionicframework.com/t/custom-http-headers/108386 "2017-10-10T15:59:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![And](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@And](https://forum.ionicframework.com/u/And)\
**Post date:** [October 10, 2017, 3:59pm UTC](https://forum.ionicframework.com/t/custom-http-headers/108386/1 "2017-10-10T15:59:12Z")

</div>

Hi, I’m trying to add a custom http header and the code works on android, but not on ios. I’m using HttpHeaders from @angular/common/http with the following code:

```auto
let headers = new HttpHeaders()
            .append('Content-Type', 'application/x-www-form-urlencoded')
            .append('X-Test-App-Version', 'my version text');

```

If I just set or append a single header then the header is set on iOS, but when more than 1 header is set iOS will not send the request. We also tried using the older Headers using @angular/http which had the same problem. Any help would be appreciated - thank you!

---

<div class="post-metadata">

**Author:** ![And](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@And](https://forum.ionicframework.com/u/And)\
**Post date:** [October 11, 2017, 11:55am UTC](https://forum.ionicframework.com/t/custom-http-headers/108386/2 "2017-10-11T11:55:09Z")

</div>

This is now resolved - the issue was because we were using [https://ionicframework.com/docs/wkwebview/](https://ionicframework.com/docs/wkwebview/)

Which is good to do - but it’s more strict than the older UIWebView as it enforces CORS - see the link above.

To get our iOS app to work we had to get the server to accept the custom headers we were sending by setting ‘Access-Control-Allow-Headers’ server side.
