When I submit an angularjs $http GET call I receive an XML parsing error.
The $http call code snippet is:
$http({
method: 'GET',
url: "myapp/api/items" + itemId
});
The error is:
XML Parsing Error: no element found Location: moz-nullprincipal:{f191853f-5581-b049-b83f-5f4b69211adb} Line Number 1, Column 1:
The data being returned is JSON. If I put the URL in a browser then the request is submitted and the response data comes back successfully in the browser.
I tried adding responseType: 'json' (and responseType: 'application/json') to the $http call with no success. (I referenced the Usage section in angularjs http doc to determine how to configure the call.)
Is there a way I can force the response data to be recognize as json to avoid that error?