getLearningCenters(): Observable<LearningCenter> {
console.log(Api.LearningCenters);
return this.http.get<LearningCenter>(Api.LearningCenters);
}
//Api.LearningCenters="http://api.mylearnerapp.com/api/learnerningcenters"
What is the error that is showing on device?
Got this fixed by enabling server side Cors thanks for the help everyone
I’ve already enabled cors on the server side but unsuccessfully
I also got the same issue and this one is the serios which needs to be resolved.
i used the two apis.
- some random data api i used this one - http://dummy.restapiexample.com/api/v1/employees
- created in node
output for 1:
it seems to work fine in my device and in browser here is the screenshot below
output for 2: (data is not showing in the device)
bus here the second out is showing data into the browser but in the device it is not showing the data.
Not sure if this will solve your problem but it solved mine:
10.0.2.2 this is ur ip address right
Hi. I am facing exactly the same problem. Did u solve it?
The post you replied to is using an HTTP endpoint, not HTTPS. If that’s the case with you as well, try changing your endpoint to use HTTPS instead and see if the problem persists.
Hi. I am facing the same problem. Did u solve it?
Hi! I am already using HTTPS endpoints. It is really weird since the api calls are sent but the data is coming back with a delay. In the browser, everything works in time.
That doesn’t sound like exactly the same problem as the post you replied to. I would start a new topic, and please try to post as much information as is needed for people to reproduce your situation.
in AndroidManifest.xml add the android:usesCleartextTraffic=“true” as like following.
It worked for me thanks I could not display the data coming from my rest api in the versions of android 9 and 10 and because the more recent versions of android do not accept unsecured data that is to say unencrypted and it is therefore necessary to make these data secure by securing the address containing the rest service.
This works for me!
thank you so much… i was going crazy @_@
You saved my day bro god bless you
It works for me thanks