I am currently writing a feature in the Ionic framework that requires communication with an API. I attempt to use the XMLHttpRequest() function like the majority of resources I found online call for, but the request fails each time, despite the fact that I have internet access, with the cannot load error.
If it makes any difference, I am testing the app with ionic serve --lab, and through a local machine (which is connected to the internet. I guess I am also wondering to some degree what the proper way to communicate with a RESTful API through Ionic would be, as well. Any help would be greatly appreciated.