# Problem with service HTTP origins

**URL:** <https://forum.ionicframework.com/t/problem-with-service-http-origins/168044>\
**Category:** ionic-v3\
**Created:** [July 6, 2019, 2:15pm UTC](https://forum.ionicframework.com/t/problem-with-service-http-origins/168044 "2019-07-06T14:15:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisandrodc](https://avatars.discourse-cdn.com/v4/letter/l/a8b319/32.png) [@lisandrodc](https://forum.ionicframework.com/u/lisandrodc)\
**Post date:** [July 6, 2019, 2:15pm UTC](https://forum.ionicframework.com/t/problem-with-service-http-origins/168044/1 "2019-07-06T14:15:58Z")

</div>

Hello, I have made an APP similar to the news but consuming a service created by me. Locally without executing it by means of a real device, the functions to the services are invoked correctly. But when I go to the real device I get the error:

 ![error](https://global.discourse-cdn.com/ionicframework/original/3X/0/7/077bf3049f283251104cdf820a813c9fc61bfabf.png)

In my PHP service I added the headers:

```
     header ('Access-Control-Allow-Origin: *');

```

header (“Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept”);

header (‘Access-Control-Allow-Methods: GET, POST, PUT, DELETE’);

But follow the same error. Previously I gave that same error but with those headers it was solved … with the real device no.

From Angular I invoke import {HttpClient} from ‘@ angular / common / http’;

Thank you very much in advance!

Regards!
