# $http.post doesn't work on iphone

**URL:** <https://forum.ionicframework.com/t/http-post-doesnt-work-on-iphone/2442>\
**Category:** ionic-v1\
**Created:** [March 31, 2014, 1:12am UTC](https://forum.ionicframework.com/t/http-post-doesnt-work-on-iphone/2442 "2014-03-31T01:12:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pink\_tshirt](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@pink\_tshirt](https://forum.ionicframework.com/u/pink_tshirt)\
**Post date:** [March 31, 2014, 1:12am UTC](https://forum.ionicframework.com/t/http-post-doesnt-work-on-iphone/2442/1 "2014-03-31T01:12:29Z")

</div>

I am not sure what the issue is but I can’t get angular’s $http.post function to work:

```
.controller('channelCtrl', function($http) {
    var requestData = {
      "post":"/api/v1/post/" + postSlug + "/",
      "like_status": ture
    }   				
    
    $http.post("http://website.com/api/v1/postlike/", requestData, {
        headers: { 'Content-Type': 'application/json'}
    }).success(function(responseData) {
        console.log(responseData)
    }).error(function(err) {
        console.log(err)
    })
}

```

It WORKS in my browser but does not work on my device.

p.s. console.log does not return anything. It seems like the function doesnt get called at all

---

<div class="post-metadata">

**Author:** ![coen\_warmer](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/coen_warmer/32/64036_2.png) [@coen\_warmer](https://forum.ionicframework.com/u/coen_warmer)\
**Post date:** [March 31, 2014, 2:08am UTC](https://forum.ionicframework.com/t/http-post-doesnt-work-on-iphone/2442/2 "2014-03-31T02:08:20Z")

</div>

Could it have something to do with Cordova’s access-origin in config.xml? [http://docs.phonegap.com/en/1.9.0/guide\_whitelist\_index.md.html](http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html)

---

<div class="post-metadata">

**Author:** ![pink\_tshirt](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@pink\_tshirt](https://forum.ionicframework.com/u/pink_tshirt)\
**Post date:** [March 31, 2014, 5:24am UTC](https://forum.ionicframework.com/t/http-post-doesnt-work-on-iphone/2442/3 "2014-03-31T05:24:31Z")

</div>

It could be. Well, according to the new docs (Version 3.4) you need to edit your config.xml files instead of Cordova.plist

I tried adding different variations of

but nothing helped:(

---

<div class="post-metadata">

**Author:** ![gorkaeff](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gorkaeff](https://forum.ionicframework.com/u/gorkaeff)\
**Post date:** [March 31, 2014, 8:06am UTC](https://forum.ionicframework.com/t/http-post-doesnt-work-on-iphone/2442/4 "2014-03-31T08:06:52Z")

</div>

> [@pink\_tshirt](#):
>
> “like\_status”: ture

Are there a error? “true”?? But I don’t know why you works in browser and not in your device.

Bye

---

<div class="post-metadata">

**Author:** ![SamPa](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@SamPa](https://forum.ionicframework.com/u/SamPa)\
**Post date:** [November 11, 2014, 3:16pm UTC](https://forum.ionicframework.com/t/http-post-doesnt-work-on-iphone/2442/5 "2014-11-11T15:16:14Z")

</div>

Hi there,  
did you fix it?  
i have the same problem.

thanks
