Using the soundcloud API: redirecting to file:// instead of http://


I am trying to use the soundcloud api to build an App that can play some of their audio files.

I am querying an URL on the server and it redirects me towards another web address, which is the desired behavior, like so:

    url: myurl,
    method: "GET",
    params: {
        param1: param1
}).then(function(response) {
    // do stuff

When I do it in my testing browser with ionic serve, I don’t have any issue and I get the information from <redirectedUrl>: ionic has followed the redirection correctly.

When I launch ionic run android and do it on my android phone, I get a

Failed to load resource: net::ERR_FILE_NOT_FOUND  

I am assuming ionic/angular is mixing up the meaning of // somewhere… Is there a way to force the http protocole during the redirection?


My bad, the problem was in the soundcloud api: they are using the current window location to deduce the protocol to use if you don’t specify it.

If anyone stumbles upon that, you have to specify'')

instead of'/track/1234')

like indicated in the doc.