I'm using angular-phonegap-seed to write a mobile app, and was wondering if there were any known issues with using $http.
My controller code is called on the push of a button.
$http.get('http://192.168.1.2:8000/request_token').success(function(data, status, headers, config){
$scope.token = 'sucess: ' + data + ' ' + status + ' ' + headers + ' ' + JSON.stringify(config);
}).error(function(data, status, headers, config){
$scope.token = 'error: ' + data + ' ' + status + ' ' + headers + ' ' + JSON.stringify(config);
});
At the moment, request_token
on the server is simply a file with a dummy token in it.
The server acknowledges getting the request in the console and responds with 200. The phonegap app on android however responds:
error: undefined undefined undefined {"transformrequest": [NULL], "transformresponse": [NULL], "method": "GET", "url": "http://server-ip:8000/request_token", "headers": {"accept": "application/json, text/plain, */*"}}
Can I use the regular $http.get() method in phonegap, or do I have to use a phonegap api?