I am using angular -phonegap-seed to record a mobile application and wonder if there were any known issues using $ http.
My controller code is invoked by the click 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 just a dummy token file.
The server confirms the receipt of the request in the console and answers 200. However, the phonegap application on the android 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 a telephone call, or do I need to use the handset api?
source share