# Http post from device has no content

**URL:** <https://forum.ionicframework.com/t/http-post-from-device-has-no-content/79401>\
**Category:** ionic-v3\
**Created:** [February 13, 2017, 9:49am UTC](https://forum.ionicframework.com/t/http-post-from-device-has-no-content/79401 "2017-02-13T09:49:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris7374](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@chris7374](https://forum.ionicframework.com/u/chris7374)\
**Post date:** [February 13, 2017, 9:49am UTC](https://forum.ionicframework.com/t/http-post-from-device-has-no-content/79401/1 "2017-02-13T09:49:20Z")

</div>

Hi all,  
could you please help me with a problem posting json data to a service using ionic 2?

when i make a post with json-data on a mac (ionic serve), the call arrives at the service (windows machine), json data is included (see dump 1).  
When i do the same post on an ios device (iphone), the call also arrives at the service (including preflight etc., all ok), but the json data is not included (-\>content lengh is zero, see dump 2)

I have no idea what could be the reason for this (CORS should all be ok as I can see the OPTIONS call, the ack back to the app and then the post… The post is working on android devices as well as in ionic serve (app and service on different machines) (the only difference I realized is the referer, but both are remote machines…)

**dump 1 (ionic serve on mac)** (this has the post data included)  
Hypertext Transfer Protocol  
POST /FactWorkProjectPlanRestSvc/testCall HTTP/1.1\r\n  
[Expert Info (Chat/Sequence): POST /FactWorkProjectPlanRestSvc/testCall HTTP/1.1\r\n]  
[POST /FactWorkProjectPlanRestSvc/testCall HTTP/1.1\r\n]  
[Severity level: Chat]  
[Group: Sequence]  
Request Method: POST  
Request URI: /FactWorkProjectPlanRestSvc/testCall  
Request Version: HTTP/1.1  
Host: 10.80.10.94:8732\r\n  
Access-Control-Allow-Origin: \*\r\n  
Accept: _/_\r\n  
Access-Control-Allow-Methods: GET,PUT,POST,DELETE\r\n  
Access-Control-Allow-Headers: Origin,X-Requested-With,Content-Type,Accept\r\n  
Accept-Language: de-de\r\n  
Accept-Encoding: gzip, deflate\r\n  
Content-Type: application/json\r\n  
Origin: [http://localhost:8100](http://localhost:8100)\r\n  
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_12\_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8\r\n  
Referer: [http://localhost:8100/\r\n](http://localhost:8100/%5Cr%5Cn)  
Content-Length: 120\r\n  
[Content length: 120]  
Connection: keep-alive\r\n  
\r\n  
[Full request URI: [http://10.80.10.94:8732/FactWorkProjectPlanRestSvc/testCall](http://10.80.10.94:8732/FactWorkProjectPlanRestSvc/testCall)]  
[HTTP request 2/2]  
[Prev request in frame: 94]  
File Data: 120 bytes  
JavaScript Object Notation: application/json  
Object  
Member Key: Username  
String value: xxx  
Key: Username

**dump 2 (no content - iphone)**  
Hypertext Transfer Protocol  
POST /FactWorkProjectPlanRestSvc/testCall HTTP/1.1\r\n  
[Expert Info (Chat/Sequence): POST /FactWorkProjectPlanRestSvc/testCall HTTP/1.1\r\n]  
[POST /FactWorkProjectPlanRestSvc/testCall HTTP/1.1\r\n]  
[Severity level: Chat]  
[Group: Sequence]  
Request Method: POST  
Request URI: /FactWorkProjectPlanRestSvc/testCall  
Request Version: HTTP/1.1  
Host: nbchriswe:8732\r\n  
Access-Control-Allow-Origin: \*\r\n  
Accept: _/_\r\n  
Access-Control-Allow-Methods: GET,PUT,POST,DELETE\r\n  
Access-Control-Allow-Headers: Origin,X-Requested-With,Content-Type,Accept\r\n  
Accept-Language: de-de\r\n  
Accept-Encoding: gzip, deflate\r\n  
Content-Type: application/json\r\n  
Origin: [http://ionic.local](http://ionic.local)\r\n  
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10\_2\_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Mobile/14D27 (5198883568)\r\n  
Referer: [http://ionic.local/var/containers/Bundle/Application/555EC584-2A14-4F3F-8746-1255F3525A8C/FactWork.ProjektPlan.app/www/index.html\r\n](http://ionic.local/var/containers/Bundle/Application/555EC584-2A14-4F3F-8746-1255F3525A8C/FactWork.ProjektPlan.app/www/index.html%5Cr%5Cn)  
Content-Length: 0\r\n  
[Content length: 0]  
Connection: keep-alive\r\n  
\r\n  
[Full request URI: [http://nbchriswe:8732/FactWorkProjectPlanRestSvc/testCall](http://nbchriswe:8732/FactWorkProjectPlanRestSvc/testCall)]  
[HTTP request 2/2]  
[Prev request in frame: 20404]  
[Response in frame: 21295]

**System Info:**  
Cordova CLI: 6.5.0  
Ionic Framework Version: 2.0.1  
Ionic CLI Version: 2.1.17  
Ionic App Lib Version: 2.1.7  
Ionic App Scripts Version: 1.0.0  
ios-deploy version: 1.9.1  
ios-sim version: 5.0.13  
OS: macOS Sierra  
Node Version: v7.2.1  
Xcode version: Xcode 8.2.1 Build version 8C1002

Thanks in advance,  
Chris

---

<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:** [February 13, 2017, 11:24pm UTC](https://forum.ionicframework.com/t/http-post-from-device-has-no-content/79401/2 "2017-02-13T23:24:48Z")

</div>

[Switch to HTTPS](https://forum.ionicframework.com/t/ionic2-rc5-body-removed-from-post-put-calls/77591).

---

<div class="post-metadata">

**Author:** ![chris7374](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@chris7374](https://forum.ionicframework.com/u/chris7374)\
**Post date:** [February 16, 2017, 10:03am UTC](https://forum.ionicframework.com/t/http-post-from-device-has-no-content/79401/3 "2017-02-16T10:03:23Z")

</div>

That did it, thank you!
