I am making an ajax call from Angular JS:
var response = $http.post( '/services/login/?_nochache='+new Date().getTime(), JSON.stringify(credentials) );
I am adding the _nocache parameter, assuming that maybe some kind of cache or something like that.
I also convert the credentials object to a string, thinking that Internet Explorer cannot recognize the object.
I really got lost here. In chrome, the call works fine, in IE 10 the service response is null.
What could be the reason for this?
EDIT
The service returns 401 , which is normal, because the user is mistaken, but the answer should be (as in other browsers), an error line in which the user says that it is wrong, in this case is zero.
I use the promise as follows:
promise.then(onLoginOk, onLoginError); ... function onLoginError(response) { console.log(JSON.stringify(response)); }
Console returns
{ "data": null, "status": -1, "config": { "method": "POST", "transformRequest": [ null ], "transformResponse": [ null ], "url": "http://dev.site.com:8000/api/auth/login/", "data": { "username": "mail@domain.com", "password": "password" }, "headers": { "Accept": "application/json, text/plain, */*", "Content-Type": "application/json;charset=utf-8" } }, "statusText": "" }
EDIT
Here is the response body that I get in IE. 
These are the headers I get with 401 , which is correct, but the response body is erroneous. 