Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49167

No response from $http on basic login

$
0
0

@pChevald wrote:

Hello,
We are creating a Ionic app with a Symfony api and we have a problem with $http when login on iOS. When login or password are not corrects, $http never received response from the api and timeout 30seconds later with status 0, althought everything works fine on Android with the same code (api responses are the same regardless of the platform). We tries a lot of different things but it seems like iOS refuses to receive the response for this particular request. Other requests works normally, response and status are received as expected. Below is the login request code

    $http.defaults.headers.common.Authorization = 'Basic ' + Base64.encode(user + ':' + password);
    $http.get("https://myserver.com/api/login")
    .success(function(data, status) {
           console.log("success");
    })
    .error(function(error, status) {
           console.log("error");
    });

Do somebody has ever encounter this kind of problem with iOS or even know how to fix it (or at least to debug it !)?
I don't know what code can make you help us so let me know !

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 49167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>