HTTP Basic Authentication Fails on IOS

Hi guys.

I have trouble making GET requests with basic autentication header …

This is my code .

$ Http.defaults.headers.common [ ' authorization '] = ' Basic ' + base64.encode ( user.username + ' : ' + user.password ) ; $http.get(ENV.apiEndpoint + 'api/token/' + uuid) .success(function (data, status) { alert("success"); if (data.token) { $rootScope.token = data.token; } deferred.resolve(data); }) .error(function (response) { alert("failed"); deferred.resolve(response); });

This code works fine on Android, but iOS does not return any result … (the alerts don’t show never) .

Any suggestions ?

I have the same problem…Any solution?

what data are you receiving?

Check your info.plist for

<key>NSAppTransportSecurity</key>  
<dict>  
    <key>NSAllowsArbitraryLoads</key>
    <true />  
</dict>