Get request returns index.html file

Hi I am making a GET request with HttpClient and It fails because it returns the index.html file

Very hard to understand your problem just with this information. Check this.

share your sample code to understand your problem as well send your error

I am having a basic ionic start project. And I am trying to make a get request with the HttpClient.get. When I make the request the error that I have is that It can’t parse HTML, because from the response of the request is the index.html file. I don’t have a sample code because it is really just injecting the HttpClient to a blank project and calling get. I read that I have to white list the url whit the whitelist plugin I did that but i still get the index.html file.

Ordinarily HttpClient expects to receive JSON, so it seems that your beef is not with HttpClient itself, but either with the configuration of the server that is feeding it HTML instead of JSON or with the definition of the endpoint that HttpClient is trying to access.

Not exactly because when I make the request on the browser everything is ok but then on the phone I got the index.html

Also I just tried make a get request to Wikipedia API and I got the same error