Help in sending Get Request in Ionic


So i’m well aware of HttpClient as a module to send request to a REST API server. The thing is I have developed a REST API in Php and have it hosted in my bought web server. Whenever I send a get request from postman/browser, I get the desired response. However, when I try to send a get request from my ionic app. I’m faced with Http 406 error.

Can somebody try and send a request to this url: ?

If you’re successful, kindly teach me how to do so as I’ve had this problem for 1 week now. And I am stuck.

Here are the screenshots of my codes:



Desired response is {“id”:“5”,“name”:“Gullas Memorial Hospital”,“type”:null} of JSON type.


See if the problem persists using HTTPS instead of HTTP.


What do you mean? Can you instruct me what to do to in using HTTPS instead of HTTP?

You probably need your REST server to be served using https instead of http.

Try your code using this url…

Hi Geoff,

I did get the data using my ionic app from the url endpoint you’ve provided. Will try to implement the same thing with my REST API later when I get home. Gonna keep you posted.


Hi Geoff,

Unfortunately, it didn’t work too on my API. It keeps on responding with 406 error. I just don’t know what causes this issue.

TODO list:

Thanks for the reminders. However, I have already dealt with my situation but it doesn’t have anything to do with Https nor SSL certificate. I’m grateful regardless!